From 4c1c6309b30769b028f8840a1c969cfd53d937bb Mon Sep 17 00:00:00 2001 From: Manish Jethani Date: Wed, 18 Aug 2021 17:22:54 +0530 Subject: [PATCH] Add tests for SNFE filter loading multiple calls (#3836) --- platform/npm/tests/snfe.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/platform/npm/tests/snfe.js b/platform/npm/tests/snfe.js index 10dbac9d3..0ce13a036 100644 --- a/platform/npm/tests/snfe.js +++ b/platform/npm/tests/snfe.js @@ -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', () => {