2

I have a question about MatchTest in package.json I have a file call EventSourceMock.bs.js which is a library to mock event source. Plus I have other files like CalculatorTest.bs.js Then my package MatchTest is set to this "**/**(Spec|Test).bs.js" When I run the test, CalculatorTest.bs.js passed but the result said this ``` FAIL EventSourceMock.bs.js ● Test suite failed to run

Your test suite must contain at least one test.

  at node_modules/jest-cli/build/test_scheduler.js:157:22

```

It looks like jest thought that EventSourceMock.bs.js is a test file instead of a library.

So I was playing around and I changed MatchTest to "**/**{(Spec|Test)}.bs.js"

Surprisingly it passed..

Any idea?

skyboyer
  • 22,209
  • 7
  • 57
  • 64

0 Answers0