-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement Mocha-specific args parser * Configure new parseArgv to split Webpack and Mochapack args in output * Add function for converting Mocha args to options * Ensure options from parsed args handles Webpack and Mochapack args * Refactor requireWebpackConfig to make it easier to reason about * Rename parseConfig to parseMochaOptsFile to be more explicit * Improve arg translation to simplify Mocha init, rename loadReporter to getReporterConstructor to increase explicitness * Add a new Mocha initializer function and clean up eslint in tests * Split webpack config creation into separate method and improve readability * Whoops missed that glob was an internal util instead of from external library * Fix broken tests after glob replacement * Convert loose strings to constants * Begin shifting MochaWebpack constructor to prefer configuration at initialization * Rework library to use new args parser and Mocha initializer * Clean up and light directory structure refactor * Rename MochaWebpack to Mochapack * Drop Mocha 4 support * Loosen equality strictness for initMocha test * Ensure tests run with Mocha 6 and 7 * Update Mocha peer dependency version * Update ts-mocha to fix mocha peer dependency issue * Fix major version checking
- Loading branch information
Jack Alden Barry
authored
May 6, 2020
1 parent
ff12edd
commit 3fae494
Showing
82 changed files
with
5,395 additions
and
4,572 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
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
**/*.txt | ||
**/*.css | ||
**/*.scss | ||
**/*.yml | ||
test/**/*.js |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
}, | ||
"description": "mocha cli with webpack support", | ||
"bin": "./bin/mochapack", | ||
"main": "./lib/createMochaWebpack.js", | ||
"main": "./lib/createMochapack.js", | ||
"files": [ | ||
"*.md", | ||
"bin", | ||
|
@@ -21,7 +21,7 @@ | |
"build": "yarn run clean-lib && tsc", | ||
"format": "prettier '{src,test}/**/*' ./*.json --write --loglevel warn", | ||
"lint": "eslint src/**/*.ts test/**/*.ts --fix", | ||
"test": "yarn run clean-tmp && yarn run build && ts-mocha --timeout 10000 --recursive --require @babel/register --exit \"test/**/*.test.ts\"", | ||
"test": "yarn run clean-tmp && yarn run build && ts-mocha --timeout 10000 --recursive --require @babel/register --exit \"{test,src}/**/*.test.ts\"", | ||
"cover": "cross-env BABEL_ENV=coverage nyc --reporter=lcov --reporter=text npm test", | ||
"posttest": "yarn run format && yarn run lint", | ||
"docs:clean": "del-cli _book", | ||
|
@@ -48,7 +48,7 @@ | |
"author": "Victor Vlasenko <[email protected]>", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"mocha": ">=4 <=7", | ||
"mocha": ">=6 <=7", | ||
"webpack": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
|
@@ -66,7 +66,10 @@ | |
"@types/lodash": "^4.14.149", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.12.17", | ||
"@types/sinon": "^9.0.0", | ||
"@types/sinon-chai": "^3.2.4", | ||
"@types/webpack": "^4.41.0", | ||
"@types/yargs": "^15.0.4", | ||
"@typescript-eslint/eslint-plugin": "^2.11.0", | ||
"@typescript-eslint/parser": "^2.11.0", | ||
"anymatch": "3.1.1", | ||
|
@@ -99,11 +102,12 @@ | |
"nyc": "14.1.1", | ||
"prettier": "^1.19.1", | ||
"sass-loader": "6.0.7", | ||
"sinon": "7.5.0", | ||
"sinon": "^9.0.2", | ||
"sinon-chai": "^3.5.0", | ||
"strip-ansi": "^5.2.0", | ||
"tiny-worker": "2.3.0", | ||
"ts-mocha": "^6.0.0", | ||
"typescript": "^3.7.3", | ||
"ts-mocha": "^7.0.0", | ||
"typescript": "^3.8.3", | ||
"webpack": "4.41.0", | ||
"worker-loader": "2.0.0", | ||
"write-file-webpack-plugin": "^4.2.0" | ||
|
Oops, something went wrong.