-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve set-cookie-reload compatibility. #332 AG-23321
Squashed commit of the following: commit 421e0fe Author: Slava Leleka <v.leleka@adguard.com> Date: Fri Feb 9 19:30:48 2024 +0200 add set-cookie-reload aliases commit e90bf17 Author: Slava Leleka <v.leleka@adguard.com> Date: Fri Feb 9 19:30:20 2024 +0200 update compatibility table
- Loading branch information
1 parent
e58e25c
commit 60a20ac
Showing
5 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* eslint-disable no-underscore-dangle */ | ||
import { clearGlobalProps } from '../helpers'; | ||
|
||
const { test, module } = QUnit; | ||
const name = 'set-cookie-reload'; | ||
|
||
const beforeEach = () => { | ||
window.__debug = () => { | ||
window.hit = 'FIRED'; | ||
}; | ||
}; | ||
|
||
const afterEach = () => { | ||
clearGlobalProps('hit', '__debug'); | ||
}; | ||
|
||
module(name, { beforeEach, afterEach }); | ||
|
||
test('Checking if alias name works', (assert) => { | ||
const adgParams = { | ||
name, | ||
engine: 'test', | ||
verbose: true, | ||
}; | ||
const uboParams = { | ||
name: 'ubo-set-cookie-reload.js', | ||
engine: 'test', | ||
verbose: true, | ||
}; | ||
|
||
const codeByAdgParams = window.scriptlets.invoke(adgParams); | ||
const codeByUboParams = window.scriptlets.invoke(uboParams); | ||
|
||
assert.strictEqual(codeByAdgParams, codeByUboParams, 'ubo name - ok'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters