Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Mar 28, 2024
1 parent 21b6c8d commit 151ebb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 3 additions & 0 deletions tests/unit/parsers/test.manifestjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,9 @@ describe('ManifestJSONParser', () => {
id: '{daf44bf7-a45e-4450-979c-91cf07434c3d}',
strict_min_version: '55.0.0',
},
gecko_android: {
strict_min_version: '120.0',
},
},
browser_action: {
default_icon: icon,
Expand Down
16 changes: 7 additions & 9 deletions tests/unit/rules/javascript/test.incompatible_browser_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ describe('incompatible browser APIs', () => {
});

const { linterMessages } = await runJsScanner(jsScanner);
expect(linterMessages.length).toEqual(2);
for (const msg of linterMessages) {
expect(msg.type).toEqual(VALIDATION_WARNING);
expect(msg.message).toEqual(
expect.stringMatching(
/clipboard\.setImageData is not supported in Firefox(?: for Android)? version 50\.0/
)
);
}
expect(linterMessages.length).toEqual(1);
expect(linterMessages[0].type).toEqual(VALIDATION_WARNING);
expect(linterMessages[0].message).toEqual(
expect.stringMatching(
/clipboard\.setImageData is not supported in Firefox version 50\.0/
)
);
});

it('does not flag APIs that are not implemented on Android', async () => {
Expand Down

0 comments on commit 151ebb2

Please sign in to comment.