From 729d445b6885f69dd2c6355f38707bd42851c791 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:21:48 -0700 Subject: change the directory structure --- integration/bunjs-only-snippets/inspect.test.js | 96 ------------------------- 1 file changed, 96 deletions(-) delete mode 100644 integration/bunjs-only-snippets/inspect.test.js (limited to 'integration/bunjs-only-snippets/inspect.test.js') diff --git a/integration/bunjs-only-snippets/inspect.test.js b/integration/bunjs-only-snippets/inspect.test.js deleted file mode 100644 index bf5021c33..000000000 --- a/integration/bunjs-only-snippets/inspect.test.js +++ /dev/null @@ -1,96 +0,0 @@ -import { it, expect } from "bun:test"; - -it("jsx with two elements", () => { - const input = Bun.inspect( -
- - string inside child -
- ); - - const output = `
- - string inside child -
`; - - expect(input).toBe(output); -}); - -const Foo = () =>
foo
; - -it("jsx with anon component", () => { - const input = Bun.inspect(); - - const output = ``; - - expect(input).toBe(output); -}); - -it("jsx with fragment", () => { - const input = Bun.inspect(<>foo bar); - - const output = `<>foo bar`; - - expect(input).toBe(output); -}); - -it("inspect", () => { - expect(Bun.inspect(new TypeError("what")).includes("TypeError: what")).toBe( - true - ); - expect("hi").toBe("hi"); - expect(Bun.inspect(1)).toBe("1"); - expect(Bun.inspect(1, "hi")).toBe("1 hi"); - expect(Bun.inspect([])).toBe("[]"); - expect(Bun.inspect({})).toBe("{ }"); - expect(Bun.inspect({ hello: 1 })).toBe("{ hello: 1 }"); - expect(Bun.inspect({ hello: 1, there: 2 })).toBe("{ hello: 1, there: 2 }"); - expect(Bun.inspect({ hello: "1", there: 2 })).toBe( - '{ hello: "1", there: 2 }' - ); - expect(Bun.inspect({ 'hello-"there': "1", there: 2 })).toBe( - '{ "hello-\\"there": "1", there: 2 }' - ); - var str = "123"; - while (str.length < 4096) { - str += "123"; - } - expect(Bun.inspect(str)).toBe(str); - // expect(Bun.inspect(new Headers())).toBe("Headers (0 KB) {}"); - expect(Bun.inspect(new Response()).length > 0).toBe(true); - // expect( - // JSON.stringify( - // new Headers({ - // hi: "ok", - // }) - // ) - // ).toBe('{"hi":"ok"}'); - expect(Bun.inspect(new Set())).toBe("Set {}"); - expect(Bun.inspect(new Map())).toBe("Map {}"); - expect(Bun.inspect(new Map([["foo", "bar"]]))).toBe( - 'Map(1) {\n "foo": "bar",\n}' - ); - expect(Bun.inspect(new Set(["bar"]))).toBe('Set(1) {\n "bar",\n}'); - expect(Bun.inspect(
foo
)).toBe("
foo
"); - expect(Bun.inspect(
foo
)).toBe("
foo
"); - expect(Bun.inspect(
foo
)).toBe("
foo
"); - expect(Bun.inspect(
hi
)).toBe( - "
hi
" - ); - expect(Bun.inspect(
quoted
)).toBe( - '
quoted
' - ); - expect( - Bun.inspect( -
- -
- ) - ).toBe( - ` -
- -
`.trim() - ); - expect(Bun.inspect(BigInt(32))).toBe("32n"); -}); -- cgit v1.2.3