You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constGiven=Cucumber.GivenconstWhen=Cucumber.WhenconstThen=Cucumber.Then// ... some code ....Given(/regex/,function(){// test code})
Error:
21 02 2020 16:56:52.874:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
21 02 2020 16:56:52.876:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
21 02 2020 16:56:52.878:INFO [launcher]: Starting browser ChromeHeadless
21 02 2020 16:56:53.152:INFO [HeadlessChrome 80.0.3987 (Linux 0.0.0)]: Connected on socket iFJHo9Ucr6Sa13uLAAAA with id 6284202
HeadlessChrome 80.0.3987 (Linux 0.0.0) ERROR
Uncaught TypeError: Arguments to path.resolve must be strings
at node_modules/cucumber/dist/cucumber.js:47815:13
TypeError: Arguments to path.resolve must be strings
at Object.exports.resolve (node_modules/cucumber/dist/cucumber.js:47815:13)
at Object.exports.relative (node_modules/cucumber/dist/cucumber.js:47876:18)
at getDefinitionLineAndUri (node_modules/cucumber/dist/cucumber.js:64807:28)
at buildStepDefinition (node_modules/cucumber/dist/cucumber.js:64773:32)
at SupportCodeLibraryBuilder.defineStep (node_modules/cucumber/dist/cucumber.js:64956:67)
at test/test_steps.js:45:1
npm ERR! Test failed. See above for more details.
The text was updated successfully, but these errors were encountered:
Just saw this. You don't need to import cucumber. it's already imported when karma has been configured correctly, meaning Given/When/Then already exists as global variables for all step files. take a look at my redux-forth project that use this karma plugin
The other thing that might be keeping the globals from working is the the step files for cucumeber need to be in a folder called steps "/steps/foo.js" or the file name needs to end in ".steps.js" e.g. foo.steps.js.
Given()
not working:devDependencies:
karma.conf.js:
test_steps:
Error:
The text was updated successfully, but these errors were encountered: