LoginSignup
0
1

More than 5 years have passed since last update.

Mockgoose Error: timeout of 120000ms exceeded. Ensure the done() callback is being called in this test.

Posted at

概要

Mockgooseを利用しようとしてGithubからcloneし、テスト実行したもののエラーが発生した。

$ npm test

> mockgoose@7.3.3 test /your-project-path/Mockgoose
> mocha



  User functions
    1) "before all" hook


  0 passing (2m)
  1 failing

  1) User functions "before all" hook:
     Error: timeout of 120000ms exceeded. Ensure the done() callback is being called in this test.




npm ERR! Test failed.  See above for more details.

前提

原因調査

これという原因はわからない。状況としては、ネットワーク関係が怪しい。
仕事場では失敗するが、自宅では成功した。

自宅では以下の様にnpm testを実行すると、Cmpleted: 7.7 % (6mb / 77.3mbmbというコンソールが出力されるが、仕事場ではこの処理自体発生しなかった。

$ npm test

> mockgoose@7.3.3 test /your-project-path/Mockgoose
> mocha



  bug 15
Cmpleted: 7.7 % (6mb / 77.3mbmb
成功時の実行結果(test/index.js)
$ npm test

(node:67560) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMong
oClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-cli
ent
    ✓ isMocked
    ✓ should create a cat foo (42ms)
    ✓ should find cat foo
    ✓ should remove cat foo
(node:67560) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own pr
omise library instead: http://mongoosejs.com/docs/promises.html
    ✓ reset


  5 passing (1s)
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1