Skip to content

Commit cd9d249

Browse files
authored
exclude tests from coverage + bump TS parser (#1095)
* exclude tests from coverage + bump TS parser * larger, more targeted timeout for TS eslint parser * fix test perf by flipping exclude=>include also cleaned out dead scripts and sync'd dev dependencies * revert babel-eslint to 8.0.x seems to have some weird co-interaction with older ESLint. 🤷🏼‍♂️
1 parent f0d0c4f commit cd9d249

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

package.json

+12-14
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616
],
1717
"scripts": {
1818
"watch": "cross-env NODE_PATH=./src mocha --watch --compilers js:babel-register --recursive tests/src",
19-
"cover": "gulp pretest && cross-env NODE_PATH=./lib istanbul cover --dir reports/coverage _mocha tests/lib/ -- --recursive -R progress",
2019
"pretest": "linklocal",
2120
"posttest": "eslint ./src",
2221
"test": "cross-env BABEL_ENV=test NODE_PATH=./src nyc -s mocha -R dot --recursive tests/src -t 5s",
2322
"test-compiled": "npm run prepublish && NODE_PATH=./lib mocha --compilers js:babel-register --recursive tests/src",
24-
"coverage-report": "npm t && nyc report --reporter html",
2523
"test-all": "npm test && for resolver in ./resolvers/*; do cd $resolver && npm test && cd ../..; done",
26-
"ci-test": "eslint ./src && gulp pretest && cross-env NODE_PATH=./lib istanbul cover --report lcovonly --dir reports/coverage _mocha tests/lib/ -- --recursive --reporter dot",
27-
"debug": "cross-env NODE_PATH=./lib mocha debug --recursive --reporter dot tests/lib/",
2824
"prepublish": "gulp prepublish",
2925
"coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls"
3026
},
@@ -48,12 +44,12 @@
4844
},
4945
"homepage": "https://github.com/benmosher/eslint-plugin-import",
5046
"devDependencies": {
51-
"babel-eslint": "next",
52-
"babel-plugin-istanbul": "^2.0.1",
47+
"babel-eslint": "8.0.x",
48+
"babel-plugin-istanbul": "^4.1.6",
5349
"babel-preset-es2015-argon": "latest",
54-
"babel-register": "6.24.1",
50+
"babel-register": "^6.26.0",
5551
"babylon": "6.15.0",
56-
"chai": "^3.4.0",
52+
"chai": "^3.5.0",
5753
"coveralls": "^3.0.0",
5854
"cross-env": "^4.0.0",
5955
"eslint": "2.x - 4.x",
@@ -62,18 +58,16 @@
6258
"eslint-import-resolver-webpack": "file:./resolvers/webpack",
6359
"eslint-module-utils": "file:./utils",
6460
"eslint-plugin-import": "2.x",
65-
"eslint-plugin-typescript": "^0.8.1",
6661
"gulp": "^3.9.0",
6762
"gulp-babel": "6.1.2",
68-
"istanbul": "^0.4.0",
6963
"linklocal": "^2.6.0",
70-
"mocha": "^3.1.2",
71-
"nyc": "^8.3.0",
64+
"mocha": "^3.5.3",
65+
"nyc": "^11.7.1",
7266
"redux": "^3.0.4",
7367
"rimraf": "^2.6.2",
7468
"sinon": "^2.3.2",
7569
"typescript": "^2.6.2",
76-
"typescript-eslint-parser": "^12.0.0"
70+
"typescript-eslint-parser": "^15.0.0"
7771
},
7872
"peerDependencies": {
7973
"eslint": "2.x - 4.x"
@@ -95,6 +89,10 @@
9589
"babel-register"
9690
],
9791
"sourceMap": false,
98-
"instrument": false
92+
"instrument": false,
93+
"include": [
94+
"src/",
95+
"resolvers/"
96+
]
9997
}
10098
}

resolvers/node/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"chai": "^3.5.0",
3636
"coveralls": "^3.0.0",
3737
"mocha": "^3.5.3",
38-
"nyc": "^10.3.2"
38+
"nyc": "^11.7.1"
39+
},
40+
"nyc": {
41+
"exclude": [
42+
"test/"
43+
]
3944
}
4045
}

resolvers/webpack/package.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,17 @@
4646
"webpack": ">=1.11.0"
4747
},
4848
"devDependencies": {
49-
"babel-plugin-istanbul": "^4.1.5",
50-
"babel-preset-es2015-argon": "^0.1.0",
49+
"babel-plugin-istanbul": "^4.1.6",
50+
"babel-preset-es2015-argon": "latest",
5151
"babel-register": "^6.26.0",
52-
"chai": "^3.4.1",
52+
"chai": "^3.5.0",
5353
"coveralls": "^3.0.0",
54-
"mocha": "^2.3.3",
55-
"nyc": "^7.0.0"
54+
"mocha": "^3.5.3",
55+
"nyc": "^11.7.1"
56+
},
57+
"nyc": {
58+
"exclude": [
59+
"test/"
60+
]
5661
}
5762
}

tests/src/core/getExports.js

+2
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ describe('ExportMap', function () {
311311
})
312312

313313
context('alternate parsers', function () {
314+
314315
const configs = [
315316
// ['string form', { 'typescript-eslint-parser': '.ts' }],
316317
['array form', { 'typescript-eslint-parser': ['.ts', '.tsx'] }],
@@ -326,6 +327,7 @@ describe('ExportMap', function () {
326327

327328
let imports
328329
before('load imports', function () {
330+
this.timeout(20000) // takes a long time :shrug:
329331
imports = ExportMap.get('./typescript.ts', context)
330332
})
331333

0 commit comments

Comments
 (0)