Skip to content

Commit

Permalink
fixup! split mocha opts for JS and TS
Browse files Browse the repository at this point in the history
  • Loading branch information
bajtos committed Jan 22, 2018
1 parent 3e171d6 commit 254cbc0
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"build:full": "npm run clean:full && npm run bootstrap && npm run build && npm run mocha && npm run lint",
"pretest": "npm run clean && npm run build:current",
"test": "node packages/build/bin/run-nyc npm run mocha",
"mocha": "node packages/build/bin/select-dist mocha --opts packages/build/mocha.opts \"packages/*/DIST/test/**/*.js\" \"packages/cli/test\"",
"mocha": "node packages/build/bin/select-dist mocha --opts packages/build/mocha.ts.opts \"packages/*/DIST/test/**/*.js\" \"packages/cli/test\"",
"posttest": "npm run lint"
},
"config": {
Expand Down
8 changes: 4 additions & 4 deletions packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
"node": ">=6"
},
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build:apidocs": "lb-apidocs",
"clean": "lb-clean loopback-authentication*.tgz dist dist6 package api-docs",
"integration": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/integration/**/*.js'",
"integration": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/integration/**/*.js'",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/integration/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/integration/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-authentication*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions packages/build/mocha.ts.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--recursive
--exit
--reporter dot
--require source-map-support/register
5 changes: 2 additions & 3 deletions packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"test": "npm run mocha",
"mocha": "node bin/select-dist mocha --timeout 30000 \"test/integration/*.js\"",
"mocha": "node bin/select-dist mocha --opts mocha.js.opts --timeout 30000 \"test/integration/*.js\"",
"posttest": "npm run lint"
},
"devDependencies": {
"fs-extra": "^5.0.0",
"source-map-support": "^0.5.2"
"fs-extra": "^5.0.0"
}
}
3 changes: 1 addition & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"nsp": "^3.1.0",
"rimraf": "^2.6.2",
"sinon": "^4.1.2",
"source-map-support": "^0.5.2",
"yeoman-assert": "^3.1.0",
"yeoman-test": "^1.7.0"
},
Expand All @@ -55,7 +54,7 @@
},
"scripts": {
"prepublishOnly": "nsp check",
"test": "mocha test/**/*.js"
"test": "mocha --opts node_modules/@loopback/build/mocha.js.opts test/**/*.js"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": ">=6"
},
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
Expand All @@ -15,8 +15,8 @@
"clean": "lb-clean loopback-context*.tgz dist dist6 package api-docs",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-context*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": ">=6"
},
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
Expand All @@ -15,9 +15,9 @@
"clean": "lb-clean loopback-core*.tgz dist dist6 package api-docs",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"integration": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/integration/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/integration/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"integration": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/integration/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/integration/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-core*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
6 changes: 3 additions & 3 deletions packages/example-getting-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"node": ">=8"
},
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
Expand All @@ -17,8 +17,8 @@
"clean": "lb-clean loopback-getting-started*.tgz dist dist6 package api-docs",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-getting-started*.tgz && tree package && npm run clean",
"start": "npm run build && node ."
},
Expand Down
6 changes: 3 additions & 3 deletions packages/metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": ">=6"
},
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
Expand All @@ -15,8 +15,8 @@
"clean": "lb-clean loopback-metadata*.tgz dist dist6 package api-docs",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-metadata*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"clean": "rm -rf loopback-openapi-v2*.tgz dist* package",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-openapi-v2*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
6 changes: 3 additions & 3 deletions packages/repository/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"main": "index",
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
Expand All @@ -16,8 +16,8 @@
"clean": "lb-clean loopback-repository*.tgz dist dist6 package api-docs",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-juggler*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
8 changes: 4 additions & 4 deletions packages/rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": ">=6"
},
"scripts": {
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/acceptance/**/*.js'",
"acceptance": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/acceptance/**/*.js'",
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
Expand All @@ -15,9 +15,9 @@
"clean": "lb-clean loopback-rest*.tgz dist dist6 package api-docs",
"prepare": "npm run build && npm run build:apidocs",
"pretest": "npm run build:current",
"integration": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/integration/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js' 'DIST/test/integration/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts 'DIST/test/unit/**/*.js'",
"integration": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/integration/**/*.js'",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js' 'DIST/test/integration/**/*.js' 'DIST/test/acceptance/**/*.js'",
"unit": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts 'DIST/test/unit/**/*.js'",
"verify": "npm pack && tar xf loopback-rest*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down
2 changes: 1 addition & 1 deletion packages/testlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"clean": "lb-clean loopback-testlab*.tgz dist dist6 package api-docs",
"prepare": "npm run build",
"pretest": "npm run build:current",
"test": "lb-dist mocha --recursive DIST/test",
"test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.ts.opts DIST/test",
"verify": "npm pack && tar xf loopback-testlab*.tgz && tree package && npm run clean"
},
"author": "IBM",
Expand Down

0 comments on commit 254cbc0

Please sign in to comment.