diff options
author | 2022-04-10 17:41:48 -0700 | |
---|---|---|
committer | 2022-04-10 17:41:48 -0700 | |
commit | 98592fb85d6960873a5ef0028f32075978739c5c (patch) | |
tree | daaa2977f3dfdb2e622b1fd64dc34098815f5c88 /integration/bunjs-only-snippets | |
parent | 6edf0289ed0e89e9c15bee8bc4e326b02adc6984 (diff) | |
download | bun-98592fb85d6960873a5ef0028f32075978739c5c.tar.gz bun-98592fb85d6960873a5ef0028f32075978739c5c.tar.zst bun-98592fb85d6960873a5ef0028f32075978739c5c.zip |
[TOML] Fix toml parsing with multiple keys in object literal
Fixes https://github.com/Jarred-Sumner/bun/issues/140
Diffstat (limited to 'integration/bunjs-only-snippets')
-rw-r--r-- | integration/bunjs-only-snippets/toml-fixture.toml | 9 | ||||
-rw-r--r-- | integration/bunjs-only-snippets/toml.test.js | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/toml-fixture.toml b/integration/bunjs-only-snippets/toml-fixture.toml index 259891be7..090563ef7 100644 --- a/integration/bunjs-only-snippets/toml-fixture.toml +++ b/integration/bunjs-only-snippets/toml-fixture.toml @@ -7,6 +7,15 @@ inline.array = [1234, 4, 5, 6] [macros] react-relay = { "graphql" = "node_modules/bun-macro-relay/bun-macro-relay.tsx" } +[install.scopes] +"@mybigcompany2" = { "token" = "123456", "url" = "https://registry.mybigcompany.com" } +"@mybigcompany3" = { "token" = "123456", "url" = "https://registry.mybigcompany.com", "three" = 4 } + + +[install.scopes."@mybigcompany"] +token = "123456" +url = "https://registry.mybigcompany.com" + [bundle.packages] "@emotion/react" = true diff --git a/integration/bunjs-only-snippets/toml.test.js b/integration/bunjs-only-snippets/toml.test.js index 5e2d184d8..ecf0f5f8a 100644 --- a/integration/bunjs-only-snippets/toml.test.js +++ b/integration/bunjs-only-snippets/toml.test.js @@ -14,4 +14,11 @@ it("syntax", async () => { expect(toml.inline.array[0]).toBe(1234); expect(toml.inline.array[1]).toBe(4); expect(toml.dev["foo.bar"]).toBe("baz"); + expect(toml.install.scopes["@mybigcompany"].url).toBe( + "https://registry.mybigcompany.com" + ); + expect(toml.install.scopes["@mybigcompany2"].url).toBe( + "https://registry.mybigcompany.com" + ); + expect(toml.install.scopes["@mybigcompany3"].three).toBe(4); }); |