Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Polly, Timing, setupMocha, setupQunit } from '@pollyjs/core';
import { EXPIRY_STRATEGIES, MODES } from '@pollyjs/utils';
const polly = new Polly('test recording', {
mode: MODES.PASSTHROUGH,
recordFailedRequests: true,
adapters: ['xhr', 'fetch'],
persister: 'rest',
expiryStrategy: EXPIRY_STRATEGIES.ERROR,
timing: Timing.relative(3),
matchRequestsBy: {
method: true,
headers: true,
body: true,
order: true,
url: {
protocol: true,
username: true,
password: true,
hostname: true,
port: true,
pathname: true,
query: true,
hash: false,
},