-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Make cucumber not to run the @cli tag on Windows
- Loading branch information
1 parent
738143a
commit 3d9cb2f
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
{spawn} = require('child_process') | ||
|
||
|
||
# This script removes @cli behavior from tests due to | ||
# https://github.com/apiaryio/gavel-spec/issues/24 | ||
|
||
|
||
tags = ['@nodejs', '~@proposal', '~@draft', '~@nodejs-pending'] | ||
tags.push('~@cli') if process.platform.match(/^win/) | ||
|
||
|
||
args = [] | ||
for tag in tags | ||
args.push('-t') | ||
args.push(tag) | ||
|
||
|
||
cucumber = spawn('node_modules/.bin/cucumber-js', args.concat([ | ||
'-r', 'test/cucumber/support/', | ||
'-r', 'test/cucumber/step_definitions/', | ||
'-f', 'pretty', | ||
'--compiler=coffee:coffee-script/register', | ||
'node_modules/gavel-spec/features/', | ||
])) | ||
|
||
cucumber.stdout.on('data', (data) -> process.stdout.write(data)) | ||
cucumber.stderr.on('data', (data) -> process.stderr.write(data)) | ||
|
||
cucumber.on('error', (err) -> | ||
process.stdout.write(err) | ||
process.exit(1) | ||
) | ||
|
||
cucumber.on('close', (code) -> process.exit(code)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters