mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
31 lines
1020 B
JavaScript
31 lines
1020 B
JavaScript
import { describe, it, expect } from "bun:test";
|
|
import { gc } from "./gc";
|
|
|
|
it("syntax", async () => {
|
|
gc();
|
|
|
|
const toml = (await import("./toml-fixture.toml")).default;
|
|
gc();
|
|
|
|
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");
|
|
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);
|
|
gc();
|
|
});
|