mirror of https://github.com/sveltejs/svelte
chore: remove obsolete test (#10679)
Checking for expected or unexpected props in 2024 is the job TypeScript, and runtime validation has resulted in false positives previously - therefore leave this out in Svelte 5. closes #10672pull/10693/head
parent
5d3385c56f
commit
767b5a8824
@ -1,23 +0,0 @@
|
|||||||
import { test } from '../../assert';
|
|
||||||
const tick = () => Promise.resolve();
|
|
||||||
|
|
||||||
export default test({
|
|
||||||
dev: true,
|
|
||||||
skip: true, // TODO: needs dev time warning
|
|
||||||
async test({ assert, target }) {
|
|
||||||
/** @type {string[]} */
|
|
||||||
const warnings = [];
|
|
||||||
const warn = console.warn;
|
|
||||||
|
|
||||||
console.warn = (warning) => {
|
|
||||||
warnings.push(warning);
|
|
||||||
};
|
|
||||||
|
|
||||||
target.innerHTML = '<my-app foo=yes />';
|
|
||||||
await tick();
|
|
||||||
|
|
||||||
assert.deepEqual(warnings, ["<my-app> was created without expected prop 'bar'"]);
|
|
||||||
|
|
||||||
console.warn = warn;
|
|
||||||
}
|
|
||||||
});
|
|
@ -1,9 +0,0 @@
|
|||||||
<svelte:options customElement="my-app" />
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export let foo;
|
|
||||||
export let bar;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<p>foo: {foo}</p>
|
|
||||||
<p>bar: {bar}</p>
|
|
Loading…
Reference in new issue