pull/11526/head
Dominic Gannaway 2 years ago
parent fc07479efa
commit 54d024b51d

@ -16,8 +16,10 @@ export default test({
throw new Error('Expected an error');
} catch (err) {
assert.equal(
/** @type {Error} */ (err).message,
/** @type {Error} */ (err).message.includes(
'svelte_component_invalid_this_value\nThe `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined'
),
true
);
}
}

@ -12,7 +12,10 @@ export default test({
component.componentName = 'banana';
throw new Error('Expected an error');
} catch (err) {
assert.equal(/** @type {Error} */ (err).message, '$$component is not a function');
assert.equal(
/** @type {Error} */ (err).message.includes('$$component is not a function'),
true
);
}
}
});

@ -392,9 +392,9 @@ async function run_test_variant(
}
} catch (err) {
if (config.runtime_error) {
assert.equal((err as Error).message, config.runtime_error);
assert.equal((err as Error).message.includes(config.runtime_error), true);
} else if (config.error && !unintended_error) {
assert.equal((err as Error).message, config.error);
assert.equal((err as Error).message.includes(config.error), true);
} else {
throw err;
}

Loading…
Cancel
Save