-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Thanks for the tool, I'm running all my other test with jest and was wondering if it is possible to use it for nexpect
test?
Test
import nexpect from 'nexpect';
nexpect
.spawn('yarn', ['start'])
.expect('hello')
.run(function(err) {
if (!err) {
console.log('hello was echoed');
}
});
Output
Currently I got
❯ node_modules/.bin/jest --verbose --watch ./src/__tests__/cli.test.ts
FAIL src/__tests__/cli.test.ts
● Test suite failed to run
Your test suite must contain at least one test.
at onResult (node_modules/jest-cli/node_modules/@jest/core/build/TestScheduler.js:175:18)
at node_modules/emittery/index.js:260:13
at Array.map (<anonymous>)
at Emittery.emit (node_modules/emittery/index.js:258:23)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.132 s
Ran all test suites matching /.\/src\/__tests__\/cli.test.ts/i.
Active Filters: filename /./src/__tests__/cli.test.ts/
› Press c to clear filters.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press o to only run tests related to changed files.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
● Cannot log after tests are done. Did you forget to wait for something async in your test?
Attempted to log "hello was echoed".
10 | });
11 |
at console.log (node_modules/jest-cli/node_modules/@jest/console/build/CustomConsole.js:187:10)
at src/__tests__/cli.test.ts:12:17
at ChildProcess.<anonymous> (node_modules/nexpect/lib/nexpect.js:303:9)
Metadata
Metadata
Assignees
Labels
No labels