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

Fix Following error when using string matcher #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

avneeshkumar
Copy link

............/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/pactum/src/exports/handler.js:33
    throw new PactumHandlerError(`Expect Handler Not Found - '${name}'`);
          ^

PactumHandlerError: Expect Handler Not Found - 'Ok'
    at Object.getExpectHandler (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/pactum/src/exports/handler.js:33:11)
    at Expect._validateCustomExpectHandlers (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/pactum/src/models/expect.js:437:36)
    at Expect.validate (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/pactum/src/models/expect.js:69:17)
    at Have._validate (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/pactum/src/exports/expect.js:111:26)
    at Have._ (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/pactum/src/exports/expect.js:106:17)
    at World.<anonymous> (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/features/steps/pactumSteps.js:138:31)
    at Object.run (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/@cucumber/cucumber/lib/user_code_runner.js:24:27)
    at Object.run (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/@cucumber/cucumber/lib/runtime/step_runner.js:51:59)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async TestCaseRunner.invokeStep (/Users/avneeshkumar/Documents/mailmodo/rnd/cucumber-js-demo/node_modules/@cucumber/cucumber/lib/runtime/test_case_runner.js:95:16)

Node.js v18.16.0


3 scenarios (3 passed)
20 steps (20 passed)
0m02.264s (executing steps: 0m03.607s)

@ASaiAnudeep
Copy link
Member

There is a duplicate function...

Then(/^I expect response should have a body$/, function (body) {
  spec.response().should.have.body(body);
});

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

Successfully merging this pull request may close these issues.

2 participants