-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow unknown command line arguments
- Loading branch information
1 parent
2de5dd4
commit df73386
Showing
8 changed files
with
72 additions
and
11 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
.idea | ||
test/report | ||
scaffold/report | ||
.DS_Store |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,19 @@ | ||
const path = require('path'); | ||
const assert = require('assert'); | ||
const minimist = require('minimist'); | ||
|
||
module.exports = function () { | ||
// run tests if running nemo:dynamic npm script | ||
var argv = minimist(process.argv.slice(2)); | ||
if(argv['url-from-cli']) { | ||
assert.equal(argv.U, true, '-U not specified as expected'); | ||
assert.equal(argv['url-from-cli'], 'https://www.wikipedia.org', 'urlFromCli should equal to https://www.wikipedia.org'); | ||
} | ||
|
||
return { | ||
tests: path.resolve(__dirname, '../dynamic.js'), | ||
data: { | ||
urlFromCli: argv['url-from-cli'] | ||
} | ||
}; | ||
}; |
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,10 @@ | ||
const assert = require('assert'); | ||
|
||
describe('@dynamic@', function () { | ||
it('should run quickly', async function () { | ||
let nemo = this.nemo; | ||
let {baseUrl, urlFromCli} = nemo.data; | ||
assert.equal(nemo.data.urlFromCli, 'https://www.wikipedia.org', 'urlFromCli should equal to https://www.wikipedia.org'); | ||
await nemo.driver.get(urlFromCli || baseUrl); | ||
}); | ||
}); |