diff options
author | 2022-02-05 21:26:55 -0800 | |
---|---|---|
committer | 2022-02-05 21:26:55 -0800 | |
commit | 9715c9223abfabb3cde1a7adfaf9e2a553ee901e (patch) | |
tree | c6726040027b6357d6931a0f9df0ccb9461a121f /integration/bunjs-only-snippets/toml.test.js | |
parent | ca6cdb4e9818e2a8618c8412fe83a51346368fe4 (diff) | |
download | bun-9715c9223abfabb3cde1a7adfaf9e2a553ee901e.tar.gz bun-9715c9223abfabb3cde1a7adfaf9e2a553ee901e.tar.zst bun-9715c9223abfabb3cde1a7adfaf9e2a553ee901e.zip |
Add unit test for toml imports
Diffstat (limited to 'integration/bunjs-only-snippets/toml.test.js')
-rw-r--r-- | integration/bunjs-only-snippets/toml.test.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/toml.test.js b/integration/bunjs-only-snippets/toml.test.js new file mode 100644 index 000000000..5e2d184d8 --- /dev/null +++ b/integration/bunjs-only-snippets/toml.test.js @@ -0,0 +1,17 @@ +import { describe, it, expect } from "bun:test"; + +it("syntax", async () => { + const toml = (await import("./toml-fixture.toml")).default; + expect(toml.framework).toBe("next"); + expect(toml.bundle.packages["@emotion/react"]).toBe(true); + expect(toml.array[0].entry_one).toBe("one"); + expect(toml.array[0].entry_two).toBe("two"); + expect(toml.array[1].entry_one).toBe("three"); + expect(toml.array[1].entry_two).toBe(undefined); + expect(toml.array[1].nested[0].entry_one).toBe("four"); + expect(toml.dev.one.two.three).toBe(4); + expect(toml.dev.foo).toBe(123); + expect(toml.inline.array[0]).toBe(1234); + expect(toml.inline.array[1]).toBe(4); + expect(toml.dev["foo.bar"]).toBe("baz"); +}); |