mirror of https://github.com/gorhill/uBlock.git
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:
parent
a76935b232
commit
ebe173d273
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue