avaテストランナーを使用するとエラーが発生します。コードの場合:avaテストランナーはEPIPEとECONNRESETエラーを書き込みます
test('gets account by ID with includes', async t => {
const c = new Client('http://localhost:8000/v2/', token);
const included = await c.account.get('2001', ['foo']).then(res => res.data.included);
t.is(included[0].type, 'Foo');
});
test('gets order item by ID', async t => {
const c = new Client('http://localhost:8000/v2/', token);
const orderItem = await c.orderItem.get('2000').then(res => res.data.data);
t.is(orderItem.type, 'OrderItem');
t.is(orderItem.id, '2000');
});
私が取得:
1. get › gets account by ID with includes
Error: connect ECONNRESET 127.0.0.1:8000
Object.exports._errnoException (util.js:1036:11)
exports._exceptionWithHostPort (util.js:1059:20)
TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
2. get › gets order item by ID
Error: write EPIPE
exports._errnoException (util.js:1036:11)
WriteWrap.afterWrite (net.js:794:14)
エラーはすべての時間を表示されないと、彼らは非常に低レベルのエラーですので、私はそれがsomesortのサーバ設定の問題でなければなりません疑います。おそらく私はテスト間に遅延を導入すべきでしょうか? Avaテストは多くのプロセスで生成され、同時に実行されます。
テストを連続して実行し、エラーが持続するかどうかを確認してください。すべてのテストを並行して実行している可能性があります。 – yeiniel
が動作します。あなたが解決策としてそれを書くなら、私はそれを解決させます。デベロッパーサーバーが並列テストを処理できない理由は何ですか? –