1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Add check-leaks make target (#3837)

This commit is contained in:
Manish Jethani 2021-08-18 16:58:23 +05:30 committed by GitHub
parent 7a5c4e9547
commit 2a130704e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 1 deletions

View File

@ -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

View File

@ -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",

View 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');
});
});

View File

@ -19,6 +19,8 @@
Home: https://github.com/gorhill/uBlock
*/
/* globals WebAssembly */
'use strict';
/******************************************************************************/