1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-02 23:57:10 +02:00
This commit is contained in:
Raymond Hill 2021-12-25 09:10:48 -05:00
parent b54026430e
commit 0992a5b821
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -311,6 +311,19 @@ describe('SNFE', () => {
});
assert.strictEqual(r, 0);
});
// https://github.com/gorhill/uBlock/commit/d66cd1116c0e
it('should not match on localhost', async () => {
await engine.useLists([
{ name: 'test', raw: '.js$domain=foo.*|bar.*\n/^/$domain=example.*|foo.*' },
]);
const r = engine.matchRequest({
originURL: 'https://localhost/',
type: 'script',
url: 'https://localhost/baz.js',
});
assert.strictEqual(r, 0);
});
});
});
}