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