// 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); // }); // }); option> Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/examples/with-markdown/src (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-07-08[ci] formatGravatar bholmesdev 1-1/+1
2022-07-08chore: changeset (#3873)Gravatar Ben Holmes 3-1/+10
2022-07-08Add editor integrations to language integrations (#3864)Gravatar Erika 8-6/+131
2022-07-08[ci] formatGravatar tony-sull 7-38/+59
2022-07-08Adds a new `<Picture>` component to the image integration (#3866)Gravatar Tony Sullivan 28-164/+1052
* moving all normalization logic out of the Image component * refactor: only require loaders to provide the image src * Adding a `<Picture />` component * fixing types.ts imports * refactor: moving getImage to it's own file * updating component types to use astroHTML.JSX * Revert "updating component types to use astroHTML.JSX" This reverts commit 6e5f578da8d1d3fd262f3cd9add7549f7580af97. * going back to letting loaders add extra HTML attributes * Always use lazy loading and async decoding * Cleaning up the Picture component * Adding test coverage for <Picture> * updating the README * using JSX types for the Image and Picture elements * chore: adding changeset * Update packages/integrations/image/src/get-image.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * allow users to override loading and async on the <img> * renaming config to constants, exporting getPicture() * found the right syntax to import astro-jsx Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-07-08[ci] formatGravatar bholmesdev 7-31/+60
2022-07-08[astro add] Support adapters and third party packages (#3854)Gravatar Ben Holmes 20-37/+221
* feat: support adapters and third part integrations by keywords * refactor: add keywords to all official integrations * docs: add adapter ex to astro add help * nit: clarify astro add usage * nit: highlight link * fix: use process.exit(1) on error * chore: changeset * nit: bold integration name * fix: log install instructions for adapters instead * nit: change to logAdapterConfigInstructions * Revert "fix: log install instructions for adapters instead" This reverts commit 1a459f152bc7b7991db289999f7393e5be64ea3e. * feat: add hardcoded adapter export map * refactor: inline adapter config log
2022-07-08Ignore big formatting commit (#3870)Gravatar Marcus Otterström 1-1/+3
2022-07-08[ci] formatGravatar tony-sull 1-3/+3
2022-07-08fix: Always add @astrojs/image to vite.ssr.noExternal (#3869)Gravatar Tony Sullivan 2-0/+8
* fix: always add @astrojs/image to vite.ssr.noExternal * chore: add changeset
2022-07-08Format astro files in examples (#3862)Gravatar Marcus Otterström 73-694/+957
2022-07-08Integration README fixes (#3865)Gravatar Chris Swithinbank 8-8/+17
* Remove stray XML tag in sitemap integration README * Fix link errors * Add changeset
2022-07-08fix(#3843): move @babel/types to dependencies (#3863)Gravatar Nate Moore 2-2/+2
* fix(#3843): move @babel/types to dependencies * chore: update lockfile Co-authored-by: Nate Moore <nate@astro.build>
2022-07-08Fixed broken Markdown link (#3868)Gravatar Isaac McFadyen 1-2/+2
2022-07-08chore: bump Vite minimum version (#3861)Gravatar Nate Moore 2-2/+2
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-08[ci] formatGravatar matthewp 1-1/+1
2022-07-08Better response.arrayBuffer() handling in Node (#3860)Gravatar Matthew Phillips 8-3/+125
* Better response.arrayBuffer() handling in Node * Adds a changeset
2022-07-08[ci] update lockfile (#3858)Gravatar Fred K. Bot 1-411/+437
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-08Fix manual import (#3857)Gravatar Chris Williams 1-1/+1
2022-07-07[ci] formatGravatar bholmesdev 1-3/+3
2022-07-07Docs: add adapter heading for configuration docs (#3842)Gravatar Ben Holmes 2-4/+20
* Docs: add adapter heading for configuration docs * docs: add adapter example, rework doc links * chore: changeset
2022-07-07[ci] formatGravatar natemoo-re 2-3/+3
2022-07-07fix: lint failing on astro and some integrations (#3794)Gravatar Joaquín Sánchez 7-17/+18
* fix: lint failing on astro and some integrations * chore: fix telemetry lint * chore: fix turbo cache (thx nate) * chore: fix runtime server
2022-07-07update solid peer dependenciesGravatar Fred K. Schott 2-1/+6
2022-07-07update lockfile (#3828)Gravatar Fred K. Schott 3-7/+1
2022-07-07Improve JSX definitions (#3801)Gravatar Erika 2-477/+858
2022-07-07Fix slot attribute inside expressions (#3837)Gravatar Nate Moore 8-5/+89
* fix: use slots inside expressions * test: add test for conditional named slots * test: fix incorrect test fixture * chore: update `@astrojs/compiler` * chore: add test coverage for `switch` Co-authored-by: Nate Moore <nate@astro.build>
2022-07-07[ci] formatGravatar FredKSchott 1-2/+1
2022-07-07detect package manager and improve types (#3847)Gravatar Fred K. Schott 7-44/+78
2022-07-07small create-astro wording changes (#3831)Gravatar Fred K. Schott 3-10/+15
2022-07-07Upgrade to pnpm@7.4.1, remove `patch-package` (#3747)Gravatar Nate Moore 6-127/+100
* chore: upgrade to pnpm@7.4.0, remove `patch-package` * chore: update contributing * chore: pnpm@7.4.1 * chore: bump to pnpm@7.5.0 Co-authored-by: Nate Moore <nate@astro.build>
2022-07-07[ci] formatGravatar matthewp 1-1/+1
2022-07-07Allow importing Image component from @astrojs/image (#3848)Gravatar Matthew Phillips 7-6/+20
* Allow importing Image component from @astrojs/image * Adds a changeset * Export the Image type
2022-07-06[ci] release (#3818)astro@1.0.0-beta.64@astrojs/telemetry@0.2.4@astrojs/node@0.1.4Gravatar Fred K. Bot 41-90/+90
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-07[ci] formatGravatar bholmesdev 1-1/+1
2022-07-06Fix: Infer content type with charset in dev and prod (#3841)Gravatar Ben Holmes 4-3/+23
* fix: add text/plain;charset;utf-8 header in dev * test: ensure content type for body shorthand * chore: changeset * feat: infer content type by pathname * feat: add charset to prod build handler * test: update for charset in prod build test
2022-07-06[ci] formatGravatar bholmesdev 1-2/+2
2022-07-06Fix `client:visible` directive in safari (#3839)Gravatar Ben Holmes 2-2/+20
* fix: client visible on safari * chore: changeset * refactor: wait for children with mutation observer * fix: remove unecessary settimeout * refactor: remove unecessary awaits
2022-07-06[ci] formatGravatar matthewp 1-1/+1
2022-07-06Ensure that maybeRenderHead runs last (#3821)Gravatar Matthew Phillips 5-8/+67
* Ensure that maybeRenderHead runs last * Adds a changeset * Make work with MDX
2022-07-05Fix portfolio example to use lowercase srcset (#3829)Gravatar Matthew Phillips 1-1/+1
2022-07-05[ci] formatGravatar delucis 1-29/+29