Closed
Description
Describe the bug
While pairing with @mattwynne to set up my development environment, we found that the scenarios all failed. Same error:
293) Scenario: custom world constructor is passed the parameters # features\world_parameters.feature:76
× Before # features\support\hooks.ts:20
Error: EPERM: operation not permitted, symlink 'C:\Users\gugwu\Documents\OSContribution\cucumber-js' -> 'C:\Users\gugwu\Documents\OSContribution\cucumber-js\tmp\world_parameters.feature_76\node_modules\@cucumber\cucumber'
at Object.symlinkSync (fs.js:1210:3)
at Object.createSymlinkSync (C:\Users\gugwu\Documents\OSContribution\cucumber-js\node_modules\fs-extra\lib\ensure\symlink.js:76:13) at World.<anonymous> (C:\Users\gugwu\Documents\OSContribution\cucumber-js\features\support\hooks.ts:42:11)
at Object.run (C:\Users\gugwu\Documents\OSContribution\cucumber-js\src\user_code_runner.ts:37:21)
at Object.run (C:\Users\gugwu\Documents\OSContribution\cucumber-js\src\runtime\step_runner.ts:50:41)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async TestCaseRunner.invokeStep (C:\Users\gugwu\Documents\OSContribution\cucumber-js\src\runtime\test_case_runner.ts:130:12)
at async TestCaseRunner.runHook (C:\Users\gugwu\Documents\OSContribution\cucumber-js\src\runtime\test_case_runner.ts:246:12)
at async C:\Users\gugwu\Documents\OSContribution\cucumber-js\src\runtime\test_case_runner.ts:201:20
at async TestCaseRunner.aroundTestStep (C:\Users\gugwu\Documents\OSContribution\cucumber-js\src\runtime\test_case_runner.ts:162:28) - Given a file named "features/passing_steps.feature" with: # features\step_definitions\file_steps.ts:10
"""
Feature: a feature
Scenario: a scenario
Given the world parameters are correct
"""
- Given a file named "features/support/world.js" with: # features\step_definitions\file_steps.ts:10
"""
const {setWorldConstructor} = require('@cucumber/cucumber')
function CustomWorld(options) {
for(const key in options.parameters) {
this[key] = options.parameters[key]
}
}
setWorldConstructor(CustomWorld)
"""
- Given a file named "features/step_definitions/my_steps.js" with:
# features\step_definitions\file_steps.ts:10
"""
const assert = require('assert')
const {Given} = require('@cucumber/cucumber')
Given(/^the world parameters are correct$/, function() {
assert.equal(this.a, 1)
})
"""
- When I run cucumber-js with `--world-parameters '{"a":1}'` # features\step_definitions\cli_steps.ts:19
- Then scenario "a scenario" step "Given the world parameters are correct" has status "passed" # features\step_definitions\message_steps.ts:68
√ After # features\support\hooks.ts:104
To Reproduce
Steps to reproduce the behavior:
- Open the repo on a Windows machine
- Open the git bash prompt
- Run
npm install
- Run
npm test
Expected behavior
I expected all the tests to pass.
Desktop (please complete the following information):
- : Windows 10 build 19042
Metadata
Metadata
Assignees
Labels
No labels