mirror of https://github.com/sveltejs/svelte
parent
962f04f4bf
commit
e2d63d1b34
@ -0,0 +1,21 @@
|
||||
export default {
|
||||
dev: true,
|
||||
|
||||
test(assert, component) {
|
||||
const warn = console.warn; // eslint-disable-line no-console
|
||||
|
||||
const warnings = [];
|
||||
console.warn = warning => { // eslint-disable-line no-console
|
||||
warnings.push(warning);
|
||||
};
|
||||
|
||||
component.destroy();
|
||||
component.destroy();
|
||||
|
||||
assert.deepEqual(warnings, [
|
||||
`Component was already destroyed`
|
||||
]);
|
||||
|
||||
console.warn = warn; // eslint-disable-line no-console
|
||||
}
|
||||
};
|
@ -0,0 +1 @@
|
||||
<div/>
|
Loading…
Reference in new issue