mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-20 01:12:38 +01:00
Add --full-battery option for tests (#3834)
This commit is contained in:
parent
14c8930ebb
commit
9a5a13a506
3
Makefile
3
Makefile
@ -37,6 +37,9 @@ lint: npm
|
||||
test: npm
|
||||
cd dist/build/uBlock0.npm && npm run test
|
||||
|
||||
test-full-battery: npm
|
||||
cd dist/build/uBlock0.npm && npm run test-full-battery
|
||||
|
||||
dist/build/uBlock0.dig: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
||||
tools/make-dig.sh
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
"scripts": {
|
||||
"build": "node build.js",
|
||||
"lint": "eslint js/ *.js tests/*.js",
|
||||
"test": "c8 --include=index.js --include=js/**/*.js node test.js --mocha"
|
||||
"test": "c8 --include=index.js --include=js/**/*.js node test.js --mocha",
|
||||
"test-full-battery": "c8 --include=index.js --include=js/**/*.js node test.js --mocha --full-battery"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -34,10 +34,17 @@ import { promisify } from 'util';
|
||||
async function spawnMocha() {
|
||||
const files = [
|
||||
'tests/snfe.js',
|
||||
'tests/request-data.js',
|
||||
];
|
||||
|
||||
await promisify(spawn)('mocha', [ '--experimental-vm-modules', '--no-warnings', ...files, '--reporter', 'progress' ], { stdio: [ 'inherit', 'inherit', 'inherit' ] });
|
||||
const options = [];
|
||||
|
||||
if ( process.argv[3] === '--full-battery' ) {
|
||||
files.push('tests/request-data.js');
|
||||
|
||||
options.push('--reporter', 'progress');
|
||||
}
|
||||
|
||||
await promisify(spawn)('mocha', [ '--experimental-vm-modules', '--no-warnings', ...files, ...options ], { stdio: [ 'inherit', 'inherit', 'inherit' ] });
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
Loading…
Reference in New Issue
Block a user