mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-25 03:43:25 +01:00
Add check-leaks make target (#3837)
This commit is contained in:
parent
7a5c4e9547
commit
2a130704e3
3
Makefile
3
Makefile
@ -40,6 +40,9 @@ test: npm
|
||||
test-full-battery: npm
|
||||
cd dist/build/uBlock0.npm && npm run test-full-battery
|
||||
|
||||
check-leaks: npm
|
||||
cd dist/build/uBlock0.npm && npm run check-leaks
|
||||
|
||||
dist/build/uBlock0.dig: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
||||
tools/make-dig.sh
|
||||
|
||||
|
@ -8,7 +8,8 @@
|
||||
"build": "node build.js",
|
||||
"lint": "eslint js/ *.js tests/*.js",
|
||||
"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"
|
||||
"test-full-battery": "c8 --include=index.js --include=js/**/*.js node test.js --mocha --full-battery",
|
||||
"check-leaks": "mocha --check-leaks tests/leaks.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
30
platform/npm/tests/leaks.js
Normal file
30
platform/npm/tests/leaks.js
Normal file
@ -0,0 +1,30 @@
|
||||
/*******************************************************************************
|
||||
|
||||
uBlock Origin - a browser extension to block requests.
|
||||
Copyright (C) 2014-present Raymond Hill
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
describe('Leaks', () => {
|
||||
it('should not leak', async () => {
|
||||
await import('../index.js');
|
||||
});
|
||||
});
|
@ -19,6 +19,8 @@
|
||||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* globals WebAssembly */
|
||||
|
||||
'use strict';
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user