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
1 changed files with 12 additions and 0 deletions

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', () => {