blob: 44e36cce2729abb09ce1e734923c37526d89a3c8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { describe, expect, it } from "bun:test";
import "./bun-loader-svelte";
describe("require", () => {
it("SSRs `<h1>Hello world!</h1>` with Svelte", () => {
const { default: App } = require("./hello.svelte");
const { html } = App.render();
expect(html).toBe("<h1>Hello world!</h1>");
});
});
describe("dynamic import", () => {
it("SSRs `<h1>Hello world!</h1>` with Svelte", async () => {
const { default: App }: any = await import("./hello.svelte");
const { html } = App.render();
expect(html).toBe("<h1>Hello world!</h1>");
});
});
|