|
|
|
@ -4,7 +4,7 @@ import { svelte, deindent } from "../helpers.js";
|
|
|
|
|
describe("create", () => {
|
|
|
|
|
it("should return a component constructor", () => {
|
|
|
|
|
const source = deindent`
|
|
|
|
|
<div>{{prop}}</div>
|
|
|
|
|
<div>{prop}</div>
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const component = svelte.create(source);
|
|
|
|
@ -13,7 +13,7 @@ describe("create", () => {
|
|
|
|
|
|
|
|
|
|
it("should throw error when source is invalid ", done => {
|
|
|
|
|
const source = deindent`
|
|
|
|
|
<div>{{prop}</div>
|
|
|
|
|
<div>{prop</div>
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const component = svelte.create(source, {
|
|
|
|
@ -27,7 +27,7 @@ describe("create", () => {
|
|
|
|
|
|
|
|
|
|
it("should return undefined when source is invalid ", () => {
|
|
|
|
|
const source = deindent`
|
|
|
|
|
<div>{{prop}</div>
|
|
|
|
|
<div>{prop</div>
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const component = svelte.create(source, {
|
|
|
|
|