You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/create/index.js

16 lines
408 B

import assert from "assert";
import { svelte, deindent } from "../helpers.js";
describe("create", () => {
it("should return a component constructor", () => {
const component = svelte.create(`<div>{prop}</div>`);
assert(component instanceof Function);
});
it("should throw error when source is invalid ", done => {
assert.throws(() => {
svelte.create(`<div>{prop</div>`);
}, /TODO/);
});
});