1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-20 01:12:38 +01:00

Add tests for SNFE filter loading multiple calls (#3836)

This commit is contained in:
Manish Jethani 2021-08-18 17:22:54 +05:30 committed by GitHub
parent 2a130704e3
commit 4c1c6309b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,18 @@ describe('SNFE', () => {
Promise.reject({ name: 'easyprivacy', raw: '||example.net/bar/\n^bar.js?' }),
]));
});
it('should not reject on second call in sequence', async () => {
await engine.useLists([
Promise.resolve({ name: 'easylist', raw: '/foo^\n||example.com^' }),
Promise.resolve({ name: 'easyprivacy', raw: '||example.net/bar/\n^bar.js?' }),
]);
await engine.useLists([
Promise.resolve({ name: 'easylist', raw: '/foo^\n||example.com^' }),
Promise.resolve({ name: 'easyprivacy', raw: '||example.net/bar/\n^bar.js?' }),
]);
});
});
describe('Serialization', () => {