mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-25 11:52:51 +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
|
test: npm
|
||||||
cd dist/build/uBlock0.npm && npm run test
|
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)
|
dist/build/uBlock0.dig: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
||||||
tools/make-dig.sh
|
tools/make-dig.sh
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.js",
|
"build": "node build.js",
|
||||||
"lint": "eslint js/ *.js tests/*.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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -34,10 +34,17 @@ import { promisify } from 'util';
|
|||||||
async function spawnMocha() {
|
async function spawnMocha() {
|
||||||
const files = [
|
const files = [
|
||||||
'tests/snfe.js',
|
'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() {
|
async function main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user