// import { describe, it, expect } from "bun:test"; // import { // throws, // assert, // strictEqual, // createCallCheckCtx, // createDoneDotAll, // } from "./node-test-helpers"; // describe("NodeTestHelpers.throws()", () => { // it("should pass when the function throws", () => { // throws(() => { // throw new Error("THROWN!"); // }); // }); // it("should fail when the function doesn't throw", () => { // let err; // try { // throws(() => {}, Error); // } catch (e) { // err = e; // } // expect(err instanceof Error).toBe(true); // }); // }); // describe("NodeTestHelpers.assert()", () => { // it("should pass when the provided value is true", () => { // assert(true); // }); // it("should fail when the provided value is false", () => { // let err; // try { // assert(false); // } catch (e) { // err = e; // } // expect(err instanceof Error).toBe(true); // }); // }); // describe("NodeTestHelpers.strictEqual()", () => { // it("should pass when the provided values are deeply equal", () => { // strictEqual(1, 1); // strictEqual("hello", "hello"); // const testing = { hello: "world" }; // const testing2 = testing; // testing2.hello = "bla"; // strictEqual(testing, testing2); // strictEqual(NaN, NaN); // strictEqual(Infinity, Infinity); // strictEqual(-Infinity, -Infinity); // strictEqual(null, null); // strictEqual(undefined, undefined); // }); // it("should fail when the provided values are not deeply equal", () => { // let err = null; // try { // strictEqual(1, 5); // } catch (e) { // err = e; // } // expect(err instanceof Error).toBe(true); // err = null; // try { // strictEqual({ foo: "bar" }, { foo: "bar" }); // } catch (e) { // err = e; // } // expect(err instanceof Error).toBe(true); // err = null; // try { // strictEqual("1", 1); // } catch (e) { // err = e; // } // expect(err instanceof Error).toBe(true); // err = null; // const obj1 = { foo: "bar" }; // const obj2 = JSON.parse(JSON.stringify(obj1)); // try { // strictEqual(obj1, obj2); // } catch (e) { // err = e; // } // expect(err instanceof Error).toBe(true); // }); // }); // describe("NodeTestHelpers.createCallCheckCtx", () => { // it("should pass when all mustCall marked callbacks have been called", (done) => { // const { mustCall } = createCallCheckCtx(done); // const fn1 = mustCall(() => {}); // const fn2 = mustCall(() => {}); // fn1(); // fn2(); // }); // it("should fail when all mustCall marked callbacks have NOT been called", (done) => { // const mockDone = (result) => { // expect(result instanceof Error).toBe(true); // done(); // }; // const { mustCall } = createCallCheckCtx(mockDone, 600); // const fn1 = mustCall(() => {}); // mustCall(() => {}); // fn1(); // }); // it("should allow us to get the args of the wrapped callback from mustCall", (done) => { // const { mustCall } = createCallCheckCtx(done); // const fn1 = mustCall((arg1, arg2) => { // expect(arg1).toBe("hello"); // expect(arg2).toBe("world"); // }); // fn1("hello", "world"); // }); // }); // describe("NodeTestHelpers.createDoneDotAll()", () => { // it("should pass when all dones have been called", (done) => { // const createDone = createDoneDotAll(done); // const done1 = createDone(600); // const done2 = createDone(600); // setTimeout(() => done1(), 300); // setTimeout(() => done2(), 450); // }); // it("should fail when all dones have NOT been called before timeout", (done) => { // const mockDone = (result) => { // expect(result instanceof Error).toBe(true); // done(); // }; // const createDone = createDoneDotAll(mockDone); // const done1 = createDone(400); // createDone(400); // setTimeout(() => done1(), 200); // }); // it("should allow us to combine mustCall and multiple dones", (done) => { // const createDone = createDoneDotAll(done); // const { mustCall } = createCallCheckCtx(createDone(600)); // const done1 = createDone(600); // const done2 = createDone(600); // const fn1 = mustCall(() => {}); // const fn2 = mustCall(() => {}); // setTimeout(() => done1(), 300); // setTimeout(() => done2(), 450); // setTimeout(() => fn1(), 200); // setTimeout(() => fn2(), 200); // }); // it("should fail if a done is called with an error", (done) => { // const mockDone = (result) => { // expect(result instanceof Error).toBe(true); // done(); // }; // const createDone = createDoneDotAll(mockDone); // const done1 = createDone(600); // const done2 = createDone(600); // setTimeout(() => done1(), 300); // setTimeout(() => done2(new Error("ERROR!")), 450); // }); // }); lwindcss Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/packages/astro (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-08-26chore: update readme to include alpine js integration (#4498)Gravatar Abdullah Mzaien 1-0/+1
2022-08-26Update astro check to use latest version of the language server (#4500)Gravatar Erika 3-50/+57
2022-08-26Vendor Vite's importMeta.d.ts inside our repo to workaround issue with `tsc` ...Gravatar Erika 3-1/+43
2022-08-26Only print file output only for 404 and 500 routes (#4497)Gravatar Ben Holmes 2-5/+9
2022-08-26[ci] formatGravatar matthewp 1-14/+9
2022-08-26chore: update to solid 1.5 (#4496)Gravatar Abdullah Mzaien 3-4/+17
2022-08-26Exit prerelease mode for 1.1 release (#4493)Gravatar Matthew Phillips 1-1/+1
2022-08-26Remove "as Props" from the astro examples (#4494)Gravatar Mohammed Elhaouari 8-8/+8
2022-08-26[ci] update lockfile (#4492)Gravatar Fred K. Bot 1-33/+41
2022-08-26Edit Alpinejs content generation for Docs (#4466)Gravatar Mark Spratt 1-6/+5
2022-08-26Note private env var handling with cloudflare builds (#4490)Gravatar Bjorn Lu 1-0/+14
2022-08-26Bump pnpm version (#4488)Gravatar Bjorn Lu 1-2/+2
2022-08-26Update blog.astro (#4486)Gravatar Peter Singh 1-2/+2
2022-08-25Earlier import snippet for `@astrojs/image` (#4484)Gravatar Tc001 1-0/+6
2022-08-25[ci] release (next) (#4480)create-astro@1.0.1-next.0astro@1.1.0-next.0@astrojs/react@1.1.0-next.0@astrojs/mdx@0.10.2-next.0@astrojs/markdown-remark@1.1.0-next.0Gravatar Fred K. Bot 38-76/+133
2022-08-25[ci] formatGravatar matthewp 2-11/+12
2022-08-25[MD] `extendDefaultPlugins` to preserve default remark plugins (#4474)Gravatar Ben Holmes 10-31/+100
2022-08-25Update Markdown type signature to match behavior (#4423)Gravatar Ben Holmes 8-15/+60
2022-08-25[ci] formatGravatar matthewp 1-2/+2
2022-08-25make Remark rehype options available in astro config (#4138)Gravatar gtnbssn 9-1/+108
2022-08-25[ci] formatGravatar matthewp 3-48/+60
2022-08-25Make Astro.url conform to build.format during the build (#4352)Gravatar Matthew Phillips 8-3/+108
2022-08-25[ci] formatGravatar matthewp 1-1/+1
2022-08-25Add template tsconfigs for users to extend from (#4439)Gravatar Erika 33-343/+119
2022-08-25Make astro package play nice with node16 module resolution (#4182)Gravatar Aleksander Heintz 5-13/+21