File tree Expand file tree Collapse file tree 7 files changed +44
-31
lines changed Expand file tree Collapse file tree 7 files changed +44
-31
lines changed Original file line number Diff line number Diff line change 23
23
"lint:hbs" : " ember-template-lint ." ,
24
24
"lint:js" : " eslint . --cache --cache-location '../../eslintcache/'" ,
25
25
"start" : " ember serve" ,
26
- "test" : " bash ./scripts/run_tests.sh " ,
26
+ "test" : " node ./scripts/run_tests.js " ,
27
27
"test:ember" : " ember test" ,
28
28
"test:ember-compatibility" : " ember try:each" ,
29
29
"prepublishOnly" : " ember ts:precompile" ,
Original file line number Diff line number Diff line change
1
+ // running compatibilty tests takes ~15 min on a 2019 2.6 GHz 6-Core Intel i7 16" MacBook Pro w 32 GB of RAM, vs ~25 sec
2
+ // for the regular tests
3
+
4
+ /*eslint-env node*/
5
+ const { spawnSync } = require ( 'child_process' ) ;
6
+
7
+ if ( process . env . TRAVIS || process . env . GITHUB_ACTIONS ) {
8
+ console . log ( 'In CI - running tests against multiple versions of Ember' ) ;
9
+ const result = spawnSync ( 'yarn npm-run-all lint:* test:*' , { shell : true , stdio : 'inherit' } ) ;
10
+ process . exit ( result . status ) ;
11
+ } else {
12
+ console . log ( 'Tests running locally - will only run tests against default version of Ember' ) ;
13
+ const result = spawnSync ( 'yarn npm-run-all lint:* test:ember' , { shell : true , stdio : 'inherit' } ) ;
14
+ process . exit ( result . status ) ;
15
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ for (const dir of scenariosDirs) {
29
29
30
30
const processes = scenarios . map ( ( [ filename , filepath ] ) => {
31
31
return new Promise ( resolve => {
32
- const scenarioProcess = spawn ( '/usr/bin/env' , [ ' node', filepath ] ) ;
32
+ const scenarioProcess = spawn ( 'node' , [ filepath ] ) ;
33
33
const output = [ ] ;
34
34
const errors = [ ] ;
35
35
Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ import { deepReadDirSync } from '../src/utils';
8
8
9
9
describe ( 'deepReadDirSync' , ( ) => {
10
10
it ( 'handles nested files' , ( ) => {
11
+ const expected = [
12
+ // root level
13
+ 'debra.txt' ,
14
+ // one level deep
15
+ 'cats/eddy.txt' ,
16
+ 'cats/persephone.txt' ,
17
+ 'cats/piper.txt' ,
18
+ 'cats/sassafras.txt' ,
19
+ 'cats/teaberry.txt' ,
20
+ // two levels deep
21
+ 'dogs/theBigs/charlie.txt' ,
22
+ 'dogs/theBigs/maisey.txt' ,
23
+ 'dogs/theSmalls/bodhi.txt' ,
24
+ 'dogs/theSmalls/cory.txt' ,
25
+ ] . map ( p => ( process . platform === 'win32' ? p . replace ( / \/ / g, '\\' ) : p ) ) ;
26
+
11
27
// compare sets so that order doesn't matter
12
- expect ( new Set ( deepReadDirSync ( './test/fixtures/testDeepReadDirSync' ) ) ) . toEqual (
13
- new Set ( [
14
- // root level
15
- 'debra.txt' ,
16
- // one level deep
17
- 'cats/eddy.txt' ,
18
- 'cats/persephone.txt' ,
19
- 'cats/piper.txt' ,
20
- 'cats/sassafras.txt' ,
21
- 'cats/teaberry.txt' ,
22
- // two levels deep
23
- 'dogs/theBigs/charlie.txt' ,
24
- 'dogs/theBigs/maisey.txt' ,
25
- 'dogs/theSmalls/bodhi.txt' ,
26
- 'dogs/theSmalls/cory.txt' ,
27
- ] ) ,
28
- ) ;
28
+ expect ( new Set ( deepReadDirSync ( './test/fixtures/testDeepReadDirSync' ) ) ) . toEqual ( new Set ( expected ) ) ;
29
29
} ) ;
30
30
31
31
it ( 'handles empty target directory' , ( done : ( error ?: Error ) => void ) => {
Original file line number Diff line number Diff line change 24
24
"@sentry-internal/eslint-config-sdk" : " 6.10.0" ,
25
25
"@types/jest-environment-puppeteer" : " ^4.4.0" ,
26
26
"@types/puppeteer" : " ^5.4.0" ,
27
+ "cross-env" :" ^7.0.3" ,
27
28
"express" : " ^4.17.1" ,
28
29
"jest" : " ^24.7.1" ,
29
30
"jest-puppeteer" : " ^4.4.0" ,
54
55
"fix" : " run-s fix:eslint fix:prettier" ,
55
56
"fix:prettier" : " prettier --write \" {src,test}/**/*.ts\" " ,
56
57
"fix:eslint" : " eslint . --format stylish --fix" ,
57
- "test" : " PORT=1337 jest" ,
58
+ "test" : " cross-env PORT=1337 jest" ,
58
59
"test:watch" : " jest --watch" ,
59
60
"pack" : " npm pack" ,
60
61
"circularDepCheck" : " madge --circular src/index.ts"
Original file line number Diff line number Diff line change @@ -7266,6 +7266,13 @@ create-react-context@^0.2.2:
7266
7266
fbjs "^0.8.0"
7267
7267
gud "^1.0.0"
7268
7268
7269
+ cross-env@^7.0.3:
7270
+ version "7.0.3"
7271
+ resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
7272
+ integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
7273
+ dependencies:
7274
+ cross-spawn "^7.0.1"
7275
+
7269
7276
cross-spawn@^6.0.0, cross-spawn@^6.0.5:
7270
7277
version "6.0.5"
7271
7278
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@@ -7277,7 +7284,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
7277
7284
shebang-command "^1.2.0"
7278
7285
which "^1.2.9"
7279
7286
7280
- cross-spawn@^7.0.0, cross-spawn@^7.0.2:
7287
+ cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0. 2:
7281
7288
version "7.0.3"
7282
7289
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
7283
7290
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
You can’t perform that action at this time.
0 commit comments