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

Add a test for negated type with all option

Related feedback:
- https://github.com/uBlockOrigin/uAssets/issues/7639#issuecomment-933525018
This commit is contained in:
Raymond Hill 2021-10-06 08:48:49 -04:00
parent a76935b232
commit ebe173d273
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -287,6 +287,18 @@ describe('SNFE', () => {
});
assert(engine.isBlockImportant());
});
it('should block all except stylesheets', async () => {
await engine.useLists([
{ name: 'test', raw: '||example.com^$~stylesheet,all' },
]);
const r = engine.matchRequest({
originURL: 'https://www.example.com/',
type: 'stylesheet',
url: 'https://www.example.com/',
});
assert.strictEqual(r, 0);
});
});
});
}