chore: unskip more tests (#12621)

pull/12623/head
Simon H 2 months ago committed by GitHub
parent e1728e5a0b
commit 0f41689916
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,6 +0,0 @@
import { test } from '../../test';
export default test({
// TODO JSDOM doesn't support container queries
skip: true
});

@ -2,7 +2,6 @@ import { test } from '../../assert';
const tick = () => Promise.resolve();
export default test({
skip: true, // TODO: needs inline CSS, decide how to add
async test({ assert, target }) {
target.innerHTML = '<custom-element></custom-element>';
await tick();

@ -2,28 +2,16 @@ import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
skip: true, // TODO: needs fixing
html: `
<button>Click Me</button>
<div>1</div>
`,
async test({ assert, target, window }) {
async test({ assert, target, logs }) {
const button = target.querySelector('button');
const event = new window.MouseEvent('click');
/**
* @type {any[]}
*/
const messages = [];
const log = console.log;
console.log = (msg) => messages.push(msg);
flushSync(() => {
// @ts-ignore
button.dispatchEvent(event);
});
button?.click();
flushSync();
console.log = log;
assert.deepEqual(messages, ['afterUpdate', 'onDestroy']);
assert.deepEqual(logs, ['afterUpdate', 'onDestroy']);
}
});

@ -1,9 +1,6 @@
// @ts-nocheck
import { test } from '../../test';
export default test({
skip: true, // TODO: needs fixing
get props() {
return {
things: [
@ -27,7 +24,9 @@ export default test({
test({ assert, component, target, raf }) {
let divs = target.querySelectorAll('div');
divs.forEach((div) => {
// @ts-expect-error
div.getBoundingClientRect = function () {
// @ts-expect-error
const index = [...this.parentNode.children].indexOf(this);
const top = index * 30;
@ -49,13 +48,13 @@ export default test({
];
divs = target.querySelectorAll('div');
assert.ok(~divs[0].style.animation.indexOf('__svelte'));
assert.equal(divs[1].style.animation, '');
assert.equal(divs[2].style.animation, '');
assert.equal(divs[3].style.animation, '');
assert.ok(~divs[4].style.animation.indexOf('__svelte'));
assert.ok(divs[0].getAnimations().length > 0);
assert.equal(divs[1].getAnimations().length, 0);
assert.equal(divs[2].getAnimations().length, 0);
assert.equal(divs[3].getAnimations().length, 0);
assert.ok(divs[4].getAnimations().length > 0);
raf.tick(100);
assert.deepEqual([divs[0].style.animation, divs[4].style.animation], ['', '']);
assert.deepEqual([divs[0].getAnimations().length, divs[4].getAnimations().length], [0, 0]);
}
});

@ -1,7 +1,7 @@
import { test } from '../../test';
export default test({
skip: true, // TODO: needs fixing
mode: ['client', 'hydrate'],
html: `
<span>3</span>

@ -1,8 +1,6 @@
import { test } from '../../test';
export default test({
skip: true, // TODO: needs fixing, error message is wrong
compileOptions: {
dev: true
},
@ -17,7 +15,7 @@ export default test({
throw new Error('Expected an error');
} catch (err) {
// @ts-ignore
assert.equal(err.message, "<Main>: Cannot set read-only property 'foo'");
assert.equal(err.message, 'Cannot set property foo of #<Object> which has only a getter');
}
}
});

@ -1,11 +1,7 @@
import { test } from '../../test';
export default test({
// This is skipped for now, because it's not clear how to make this work on client-side initial run:
// The anchor isn't connected to its parent at the time we can do a runtime check for the namespace, and we
// need the parent for this check. (this didn't work in Svelte 4 either)
skip: true,
html: '<svg><path></path></svg>',
html: '<svg xmlns="http://www.w3.org/2000/svg"><path></path></svg>',
test({ assert, target }) {
const svg = target.querySelector('svg');

@ -5,6 +5,6 @@
export let path = 'path';
</script>
<svelte:element this={svg}>
<svelte:element this={svg} xmlns="http://www.w3.org/2000/svg">
<svelte:element this={path}></svelte:element>
</svelte:element>

@ -1,7 +1,6 @@
import { test } from '../../test';
export default test({
skip: true,
compileOptions: {
customElement: true
}

@ -1,7 +1,6 @@
import { test } from '../../test';
export default test({
skip: true,
compileOptions: {
customElement: true
}

Loading…
Cancel
Save