Skip to content

Commit

Permalink
exclude tests from coverage + bump TS parser (#1095)
Browse files Browse the repository at this point in the history
* 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. 🤷🏼‍♂️
  • Loading branch information
benmosher authored May 4, 2018
1 parent f0d0c4f commit cd9d249
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
26 changes: 12 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@
],
"scripts": {
"watch": "cross-env NODE_PATH=./src mocha --watch --compilers js:babel-register --recursive tests/src",
"cover": "gulp pretest && cross-env NODE_PATH=./lib istanbul cover --dir reports/coverage _mocha tests/lib/ -- --recursive -R progress",
"pretest": "linklocal",
"posttest": "eslint ./src",
"test": "cross-env BABEL_ENV=test NODE_PATH=./src nyc -s mocha -R dot --recursive tests/src -t 5s",
"test-compiled": "npm run prepublish && NODE_PATH=./lib mocha --compilers js:babel-register --recursive tests/src",
"coverage-report": "npm t && nyc report --reporter html",
"test-all": "npm test && for resolver in ./resolvers/*; do cd $resolver && npm test && cd ../..; done",
"ci-test": "eslint ./src && gulp pretest && cross-env NODE_PATH=./lib istanbul cover --report lcovonly --dir reports/coverage _mocha tests/lib/ -- --recursive --reporter dot",
"debug": "cross-env NODE_PATH=./lib mocha debug --recursive --reporter dot tests/lib/",
"prepublish": "gulp prepublish",
"coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls"
},
Expand All @@ -48,12 +44,12 @@
},
"homepage": "https://github.com/benmosher/eslint-plugin-import",
"devDependencies": {
"babel-eslint": "next",
"babel-plugin-istanbul": "^2.0.1",
"babel-eslint": "8.0.x",
"babel-plugin-istanbul": "^4.1.6",
"babel-preset-es2015-argon": "latest",
"babel-register": "6.24.1",
"babel-register": "^6.26.0",
"babylon": "6.15.0",
"chai": "^3.4.0",
"chai": "^3.5.0",
"coveralls": "^3.0.0",
"cross-env": "^4.0.0",
"eslint": "2.x - 4.x",
Expand All @@ -62,18 +58,16 @@
"eslint-import-resolver-webpack": "file:./resolvers/webpack",
"eslint-module-utils": "file:./utils",
"eslint-plugin-import": "2.x",
"eslint-plugin-typescript": "^0.8.1",
"gulp": "^3.9.0",
"gulp-babel": "6.1.2",
"istanbul": "^0.4.0",
"linklocal": "^2.6.0",
"mocha": "^3.1.2",
"nyc": "^8.3.0",
"mocha": "^3.5.3",
"nyc": "^11.7.1",
"redux": "^3.0.4",
"rimraf": "^2.6.2",
"sinon": "^2.3.2",
"typescript": "^2.6.2",
"typescript-eslint-parser": "^12.0.0"
"typescript-eslint-parser": "^15.0.0"
},
"peerDependencies": {
"eslint": "2.x - 4.x"
Expand All @@ -95,6 +89,10 @@
"babel-register"
],
"sourceMap": false,
"instrument": false
"instrument": false,
"include": [
"src/",
"resolvers/"
]
}
}
7 changes: 6 additions & 1 deletion resolvers/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
"chai": "^3.5.0",
"coveralls": "^3.0.0",
"mocha": "^3.5.3",
"nyc": "^10.3.2"
"nyc": "^11.7.1"
},
"nyc": {
"exclude": [
"test/"
]
}
}
15 changes: 10 additions & 5 deletions resolvers/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,17 @@
"webpack": ">=1.11.0"
},
"devDependencies": {
"babel-plugin-istanbul": "^4.1.5",
"babel-preset-es2015-argon": "^0.1.0",
"babel-plugin-istanbul": "^4.1.6",
"babel-preset-es2015-argon": "latest",
"babel-register": "^6.26.0",
"chai": "^3.4.1",
"chai": "^3.5.0",
"coveralls": "^3.0.0",
"mocha": "^2.3.3",
"nyc": "^7.0.0"
"mocha": "^3.5.3",
"nyc": "^11.7.1"
},
"nyc": {
"exclude": [
"test/"
]
}
}
2 changes: 2 additions & 0 deletions tests/src/core/getExports.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ describe('ExportMap', function () {
})

context('alternate parsers', function () {

const configs = [
// ['string form', { 'typescript-eslint-parser': '.ts' }],
['array form', { 'typescript-eslint-parser': ['.ts', '.tsx'] }],
Expand All @@ -326,6 +327,7 @@ describe('ExportMap', function () {

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

Expand Down

0 comments on commit cd9d249

Please sign in to comment.