GitHub
03/03/2023, 5:26 AMNoMethodError:
undefined method `strip' for nil:NilClass
Steps to reproduce
The contract file is here
import { Verifier } from '@pact-foundation/pact';
import { LogLevel } from '@pact-foundation/pact-node/src/service';
import * as path from 'path';
const PACT_ROOT = path.join(__dirname, '../../', 'pact/pacts');
describe('Test An API', () => {
it('validate the expectations', async () => {
const defaultState: string = null;
const opts = {
logLevel: 'debug' as LogLevel,
providerBaseUrl: '<https://api.sandbox.dana.id>',
pactUrls: [path.join(PACT_ROOT, 'test-consumer_test-provider.json')],
stateHandlers: {
[defaultState]: async (): Promise<any> => {
// This is the "default" state handler, when no state is given
},
},
};
return await new Verifier(opts).verifyProvider();
});
});
Relevant log files
https://gist.github.com/kiennt23/45601e0f9979f7569fbd6f9c8b0489af
pact-foundation/pact-jsGitHub
03/03/2023, 5:26 AM