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 error when importing actionwords #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
package-lock.json

# TypeScript v1 declaration files
typings/
Expand All @@ -59,3 +60,6 @@ typings/

# next.js build output
.next

# codeceptjs
output/*
8 changes: 1 addition & 7 deletions features/step_definitions.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
const { I } = inject();
let actionwords;

Before(() => {
actionwords = Object.create(require('./actionwords.js')).Actionwords;
});

let actionwords = require('./actionwords.js').Actionwords;;

When(/^I start the coffee machine using language "(.*)"$/, function (lang) {
return actionwords.iStartTheCoffeeMachineUsingLanguageLang(lang);
Expand Down
6 changes: 1 addition & 5 deletions templates/javascript/codeceptjs/actionwords.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const {{#curly}} I {{/curly}} = inject();
let actionwords;

Before(() => {{#curly}}{{#indent}}
actionwords = Object.create(require('{{{ relative_path './actionwords.js' }}}')).Actionwords;{{/indent}}
{{/curly}});
let actionwords = require('{{{ relative_path './actionwords.js' }}}').Actionwords;{{/indent}}

{{#each rendered_children.actionwords}}{{{this}}}
{{/each}}