mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
E2E/integration tests: make sure tap teardown runs ✅
may be related: https://github.com/tapjs/tapjs/issues/1005
This commit is contained in:
parent
613609782d
commit
9eeafd0ae8
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,9 @@ import {ok, AssertionError} from 'assert';
|
|||
import {DateTime} from 'luxon';
|
||||
import * as a from 'assert';
|
||||
import {createRequire} from 'module';
|
||||
// Note: We *must* import tap up here, not just in the if(VCR_MODE) block below, because a) we can only use `require()` conditionally, not `import`; and b) requiring it below makes the teardown script behave differently.
|
||||
// may be related: https://github.com/tapjs/tapjs/issues/1005
|
||||
import tap from 'tap';
|
||||
import {gunzipSync} from 'zlib';
|
||||
|
||||
const hour = 60 * 60 * 1000;
|
||||
|
@ -46,7 +49,6 @@ if (process.env.VCR_MODE && !process.env.VCR_OFF) {
|
|||
const {Polly} = require('@pollyjs/core');
|
||||
const NodeHttpAdapter = require('@pollyjs/adapter-node-http');
|
||||
const FSPersister = require('@pollyjs/persister-fs');
|
||||
const tap = require('tap');
|
||||
|
||||
// monkey-patch NodeHttpAdapter to handle gzipped responses properly
|
||||
// todo: submit a PR
|
||||
|
|
Loading…
Add table
Reference in a new issue