Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite passes, but process throws AssertionError: playback not found #440

Open
skilbjo opened this issue Jan 23, 2024 · 0 comments
Open

Comments

@skilbjo
Copy link

skilbjo commented Jan 23, 2024

file.test.ts

import * as jestPlayback from 'jest-playback'; 

await jestPlayback.setup({ mode: jestPlayback.Mode.Play });

...

execution:

$ npm test -- file.test.ts -u

> node --no-warnings --experimental-vm-modules node_modules/.bin/jest file.test.ts -u

{"level":"debug","time":"2024-01-23T07:16:46.303Z","msg":"making request"}
{"level":"debug","time":"2024-01-23T07:16:46.366Z","msg":"made request"}
 PASS  file.test.ts (6.144 s)
  test
    ✓ test happy path (77 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        6.171 s, estimated 8 s
Ran all test suites matching /file.test.ts/i.
AssertionError [ERR_ASSERTION]: playback not found
    at PlaybackManager.onRequest (/Users/skilbjo/dev/providers/node_modules/jest-playback/lib/manager.js:30:17)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/skilbjo/dev/providers/node_modules/jest-playback/lib/setup.js:21:26
    at async queue.push.done (/Users/skilbjo/dev/providers/node_modules/@mswjs/interceptors/lib/node/chunk-Y5QA6OEZ.mjs:43:13)
@Johns-MacBook-Air:providers $ echo $?
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant