supertest jest

Jest Expect Methods https://jestjs.io/docs/en/expect it = test it('count > 30', async () => { await reqTarget.get("/members").expect(200) .then((res) => { //Can use foreach, more easy for(key in res.body){ //console.log(res.body\[key\].cou ); if (res.body\[key\].cou > 100) throw new Error("count: "+res.body\[key\].cou +" > 30"); //for vars value check message expect(res.body\[key\].cou ).toBeLessThan(30); } }); });

2019-04-23 · 1 min · 50 words · Me

geth 新版 豪秒產生無法匯入

geth新版的geth.log 會產生豪秒 舊 INFO [04-22|16:29:56] 新 INFO [03-28|13:43:35.004] 差別在.004 看log會發現只有logstash的warning,經同事正確解釋是: >>因為logstash轉換出來的日期格式2019-03-28 13:43:35.004,Elasticsearch不認得,所以對logstash來說是Warning,但對Elasticsearch是Error,造成Log寫不進去~ 所以在logstash.conf上必須在解析date上,補上 “YYYY-MM-dd HH:mm:ss,SSS”, “YYYY-MM-dd HH:mm:ss.SSS” date { match => \[ "gethdate" , "YYYY-MM-dd HH:mm:ss", "YYYY-MM-dd HH:mm:ss,SSS", "YYYY-MM-dd HH:mm:ss.SSS"\] target => "gethdate" timezone => "Asia/Taipei" } 這樣就可以正常匯入geth.log了

2019-04-23 · 1 min · 38 words · Me

Pinta windows linux mac

幸好Paint.NET是開放原始碼的軟體,於是有位任職於Novell公司,叫做Jonathan Pobst的開發者,利用了Paint.NET的原始碼,改用Gtk#函式庫開發了一款美工軟體,取名叫「Pinta」。 https://pinta-project.com/pintaproject/pinta/

2019-04-22 · 1 min · 3 words · Me

nodejs version npm problem install & run

You can do: 1. reget git clone 2. npm install 3. remove node_module 4. npm install agin 5. npm audit fix 6. npm start or run Sometime can Run.

2019-04-20 · 1 min · 29 words · Me

nodejs developer

g++ 安全 sudo apt-get install build-essential

2019-04-18 · 1 min · 6 words · Me