forked from phobal/ivideo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and a little refactoring for testing (#774)
This commit fixes some cross-platform issues with tests execution (related to different escaping strategies between windows and linux platforms). Also it moves end-to-end test to separate folder and allows to have multiple end-to-end tests which must be placed in ./test/e2e/... to be rocognized as end-to-end tests.
- Loading branch information
1 parent
7d49ef4
commit 1c69eb5
Showing
6 changed files
with
127 additions
and
13 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,80 @@ | ||
// flow-typed signature: 7c3e1347b297a26c04d3636782602010 | ||
// flow-typed version: <<STUB>>/cross-spawn_v^5.0.1/flow_v0.38.0 | ||
|
||
/** | ||
* This is an autogenerated libdef stub for: | ||
* | ||
* 'cross-spawn' | ||
* | ||
* Fill this stub out by replacing all the `any` types. | ||
* | ||
* Once filled out, we encourage you to share your work with the | ||
* community by sending a pull request to: | ||
* https://github.com/flowtype/flow-typed | ||
*/ | ||
|
||
declare module 'cross-spawn' { | ||
declare module.exports: any; | ||
} | ||
|
||
/** | ||
* We include stubs for each file inside this npm package in case you need to | ||
* require those files directly. Feel free to delete any files that aren't | ||
* needed. | ||
*/ | ||
declare module 'cross-spawn/lib/enoent' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'cross-spawn/lib/parse' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'cross-spawn/lib/util/escapeArgument' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'cross-spawn/lib/util/escapeCommand' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'cross-spawn/lib/util/hasEmptyArgumentBug' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'cross-spawn/lib/util/readShebang' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module 'cross-spawn/lib/util/resolveCommand' { | ||
declare module.exports: any; | ||
} | ||
|
||
// Filename aliases | ||
declare module 'cross-spawn/index' { | ||
declare module.exports: $Exports<'cross-spawn'>; | ||
} | ||
declare module 'cross-spawn/index.js' { | ||
declare module.exports: $Exports<'cross-spawn'>; | ||
} | ||
declare module 'cross-spawn/lib/enoent.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/enoent'>; | ||
} | ||
declare module 'cross-spawn/lib/parse.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/parse'>; | ||
} | ||
declare module 'cross-spawn/lib/util/escapeArgument.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/util/escapeArgument'>; | ||
} | ||
declare module 'cross-spawn/lib/util/escapeCommand.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/util/escapeCommand'>; | ||
} | ||
declare module 'cross-spawn/lib/util/hasEmptyArgumentBug.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/util/hasEmptyArgumentBug'>; | ||
} | ||
declare module 'cross-spawn/lib/util/readShebang.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/util/readShebang'>; | ||
} | ||
declare module 'cross-spawn/lib/util/resolveCommand.js' { | ||
declare module.exports: $Exports<'cross-spawn/lib/util/resolveCommand'>; | ||
} |
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
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,9 @@ | ||
const spawn = require('cross-spawn'); | ||
const path = require('path'); | ||
|
||
const s = `\\${path.sep}`; | ||
const pattern = process.argv[2] === 'e2e' | ||
? `test${s}e2e${s}.+\\.spec\\.js` | ||
: `test${s}(?!e2e${s})[^${s}]+${s}.+\\.spec\\.js$`; | ||
|
||
spawn.sync(path.normalize('./node_modules/.bin/jest'), [pattern], { stdio: 'inherit' }); |
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 |
---|---|---|
|
@@ -1412,7 +1412,7 @@ babili-webpack-plugin@^0.0.11: | |
|
||
babylon@^6.11.0, babylon@^6.13.0: | ||
version "6.15.0" | ||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" | ||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e | ||
|
||
babylon@^6.15.0, babylon@^6.16.1: | ||
version "6.16.1" | ||
|
@@ -2152,6 +2152,14 @@ cross-spawn@^3.0.1: | |
lru-cache "^4.0.1" | ||
which "^1.2.9" | ||
|
||
cross-spawn@^5.0.1: | ||
version "5.0.1" | ||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.0.1.tgz#a3bbb302db2297cbea3c04edf36941f4613aa399" | ||
dependencies: | ||
lru-cache "^4.0.1" | ||
shebang-command "^1.2.0" | ||
which "^1.2.9" | ||
|
||
[email protected]: | ||
version "0.0.2" | ||
resolved "https://registry.yarnpkg.com/cross-unzip/-/cross-unzip-0.0.2.tgz#5183bc47a09559befcf98cc4657964999359372f" | ||
|
@@ -6026,8 +6034,8 @@ postcss-reduce-transforms@^1.0.3: | |
postcss-value-parser "^3.0.1" | ||
|
||
postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: | ||
version "2.2.2" | ||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.2.tgz#3d70f5adda130da51c7c0c2fc023f56b1374fe08" | ||
version "2.2.3" | ||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" | ||
dependencies: | ||
flatten "^1.0.2" | ||
indexes-of "^1.0.1" | ||
|
@@ -6280,8 +6288,8 @@ react-proxy@^3.0.0-alpha.0: | |
lodash "^4.6.1" | ||
|
||
react-redux@^5.0.2: | ||
version "5.0.2" | ||
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.2.tgz#3d9878f5f71c6fafcd45de1fbb162ea31f389814" | ||
version "5.0.3" | ||
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.3.tgz#86c3b68d56e74294a42e2a740ab66117ef6c019f" | ||
dependencies: | ||
hoist-non-react-statics "^1.0.3" | ||
invariant "^2.0.0" | ||
|
@@ -6818,6 +6826,24 @@ sha.js@^2.3.6: | |
dependencies: | ||
inherits "^2.0.1" | ||
|
||
shebang-command@^1.2.0: | ||
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" | ||
dependencies: | ||
shebang-regex "^1.0.0" | ||
|
||
shebang-regex@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" | ||
|
||
[email protected]: | ||
version "0.7.0" | ||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.0.tgz#3f6f2e4965cec565f65ff3861d644f879281a576" | ||
dependencies: | ||
glob "^7.0.0" | ||
interpret "^1.0.0" | ||
rechoir "^0.6.2" | ||
|
||
shelljs@^0.7.5, shelljs@^0.7.6: | ||
version "0.7.6" | ||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" | ||
|