|
|
|
@ -51,7 +51,7 @@ describe("runtime", () => {
|
|
|
|
|
throw new Error("Forgot to remove `solo: true` from test");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
(config.skip ? it.skip : config.solo ? it.only : it)(`${dir} (${shared ? 'shared' : 'inline'} helpers)`, async () => {
|
|
|
|
|
(config.skip ? it.skip : config.solo ? it.only : it)(`${dir} (${shared ? 'shared' : 'inline'} helpers)`, () => {
|
|
|
|
|
if (failed.has(dir)) {
|
|
|
|
|
// this makes debugging easier, by only printing compiled output once
|
|
|
|
|
throw new Error('skipping test, already failed');
|
|
|
|
@ -105,7 +105,8 @@ describe("runtime", () => {
|
|
|
|
|
|
|
|
|
|
const window = env();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
return Promise.resolve()
|
|
|
|
|
.then(() => {
|
|
|
|
|
// set of hacks to support transition tests
|
|
|
|
|
transitionManager.running = false;
|
|
|
|
|
transitionManager.transitions = [];
|
|
|
|
@ -178,12 +179,13 @@ describe("runtime", () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (config.test) {
|
|
|
|
|
await config.test(assert, component, target, window, raf);
|
|
|
|
|
return config.test(assert, component, target, window, raf);
|
|
|
|
|
} else {
|
|
|
|
|
component.destroy();
|
|
|
|
|
assert.equal(target.innerHTML, "");
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
if (config.error && !unintendedError) {
|
|
|
|
|
config.error(assert, err);
|
|
|
|
|
} else {
|
|
|
|
@ -191,10 +193,11 @@ describe("runtime", () => {
|
|
|
|
|
showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate }, svelte); // eslint-disable-line no-console
|
|
|
|
|
throw err;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
if (config.show) showOutput(cwd, { shared, format: 'cjs', hydratable: hydrate }, svelte);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const shared = path.resolve("shared.js");
|
|
|
|
|