Skip to content

Commit

Permalink
Fix tests in IE11 (#4211)
Browse files Browse the repository at this point in the history
* Fix tests in IE11

* Add workflow_dispatch trigger to Saucelabs workflow

---------

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
  • Loading branch information
andrewiggins and JoviDeCroock authored Nov 14, 2023
1 parent 1e14862 commit e164712
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/saucelabs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Saucelabs

on:
workflow_dispatch:
push:
branches:
- main
Expand Down
8 changes: 7 additions & 1 deletion compat/test/browser/render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,13 @@ describe('compat render', () => {
/>,
scratch
);
expect(sortAttributes(scratch.innerHTML)).to.equal(

let html = sortAttributes(scratch.innerHTML);
if (/Trident/.test(navigator.userAgent)) {
html = html.toLowerCase();
}

expect(html).to.equal(
'<link as="image" href="preact.jpg" imagesrcset="preact_400px.jpg 400w" rel="preload">'
);
});
Expand Down
4 changes: 2 additions & 2 deletions test/browser/keys.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ describe('keys', () => {

function listener(mutations) {
for (const { addedNodes } of mutations) {
for (const node of addedNodes) {
for (const node of Array.from(addedNodes)) {
mutatedNodes.push(node);
}
}
Expand Down Expand Up @@ -772,7 +772,7 @@ describe('keys', () => {

function listener(mutations) {
for (const { addedNodes } of mutations) {
for (const node of addedNodes) {
for (const node of Array.from(addedNodes)) {
mutatedNodes.push(node);
}
}
Expand Down

0 comments on commit e164712

Please sign in to comment.