Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests in IE11 #4211

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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