Skip to content

yarn test:integration 'No tests found' on Windows #22

@cdpython

Description

@cdpython

Hi BJ!

Current contents of jest.config.js is below.

testMatch: ['<rootDir>/test/**/?(*.)+(spec|test).js?(x)']

run yarn test:integration command and 'No tests found' message appear like below.

λ yarn test:integration
yarn run v1.13.0
$ npm test -- test/integration

> fuzzmon-backend@0.0.1 test C:\Users\XXX\Desktop\dev\fbackend
> cross-env NODE_ENV=test jest --no-watchman "test/integration"

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0

So I changed regex like testMatch: ['<rootDir>/test/**/*.(spec|test).(js|jsx)']

and works well!

> cross-env NODE_ENV=test jest --no-watchman

 PASS  test/integration/home.test.js
  Home
    GET /
      √ <200> should always return with the API server information (34ms)
    GET /spec
      √ <200> should always return API specification in swagger format (7ms)

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        4.515s
Ran all test suites.

Thanks, Bro~👍

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions