Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/tinyini/test/root.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ describe("stringify", () => {
expect(stringify({ a: key, list: [key], f: Object.assign(() => 1, key) })).toBe(
"a=<a>\nlist[]=<0>\nf=<f>\n",
);
expect(JSON.stringify({ a: key, list: [key], f: Object.assign(() => 1, key) })).toBe(
'{"a":"<a>","list":["<0>"],"f":"<f>"}',
);
// A toJSON getter is read once, as JSON.stringify reads it.
let reads = 0;
const once = {
Expand Down
5 changes: 2 additions & 3 deletions packages/tinylinkify/test/linkify-it.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ describe("tinylinkify/linkify-it", () => {
expect(new RegExp(`^(?:${l.re.src_P})$`).test("a")).toBe(false);
});

it("reads punctuation from the engine, once", () => {
const [a, b] = [LinkifyIt(), LinkifyIt()];
expect(a.re.src_P).toBe(b.re.src_P);
it("reads punctuation from the engine", () => {
const a = LinkifyIt();
// U+1B7F, BALINESE PANTI BAWAK, came in Unicode 16; uc.micro 2.1.0 has 15.1.
const engine = /\p{P}/u.test("᭿");
expect(new RegExp(`^(?:${a.re.src_P})$`).test("᭿")).toBe(engine);
Expand Down
4 changes: 2 additions & 2 deletions packages/tinyswap/test/libraries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ describe("EXPORTS", () => {
it.each(Object.keys(EXPORTS))("lists what %s exports", async (target) => {
const [tiny, subpath] = target.split("/");
const manifest = JSON.parse(readFileSync(`../${tiny}/package.json`, "utf8")) as {
exports: Record<string, string>;
exports: Record<string, unknown>;
};
expect(manifest.exports[`./${subpath}`]).toBe(`./dist/${subpath}.mjs`);
expect(Object.keys(manifest.exports)).toContain(`./${subpath}`);
Comment thread
vite-hub[bot] marked this conversation as resolved.
Resolved
const source = new URL(`../../${tiny}/src/${subpath}/index.ts`, import.meta.url).href;
expect(EXPORTS[target]).toEqual(Object.keys((await import(source)) as object).sort());
});
Expand Down
Loading