Skip to content

Commit

Permalink
Changed CI test (Issue #443)
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverWang13 committed Dec 18, 2023
1 parent 15fb19b commit 7bb8a93
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/background/parseIAB.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ import { parseIAB } from "../../src/background/cookiesIAB.js";

describe("Check parsing of IAB signal", () => {
it('Should parse invalid signal to 1NYN', () => {
assert.equal(parseIAB("1WYY"), '1NYN');
assert.equal(parseIAB("1WYY", true), '1NYN');
});

it('Should parse valid signal 1--- to 1YYY', () => {
assert.equal(parseIAB("1---"), '1YYY');
assert.equal(parseIAB("1---",true ), '1YYY');
});

it('Should change third char in valid signal to Y', () => {
assert.equal(parseIAB("1NNN"), '1NYN');
assert.equal(parseIAB("1YNY"), '1YYY');
assert.equal(parseIAB("1NNY"), '1NYY');
assert.equal(parseIAB("1NNN", true), '1NYN');
assert.equal(parseIAB("1YNY", true), '1YYY');
assert.equal(parseIAB("1NNY", true), '1NYY');
});

it('Should change third char in valid signal to N', () => {
assert.equal(parseIAB("1NYN", true), '1NNN');
assert.equal(parseIAB("1YYN", true), '1YNN');
assert.equal(parseIAB("1YYY", true), '1YNY');
});

})
Expand Down

0 comments on commit 7bb8a93

Please sign in to comment.