mirror of
https://github.com/JonasunderscoreJones/aka-worker.git
synced 2025-10-24 02:19:17 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
parent
8cb86120f1
commit
fff961078a
1777 changed files with 1011798 additions and 0 deletions
23
cool-dawn-3d3b/node_modules/wrangler/templates/init-tests/test-jest-new-worker.js
generated
vendored
Normal file
23
cool-dawn-3d3b/node_modules/wrangler/templates/init-tests/test-jest-new-worker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
const { unstable_dev } = require("wrangler");
|
||||
|
||||
describe("Worker", () => {
|
||||
let worker;
|
||||
|
||||
beforeAll(async () => {
|
||||
worker = await unstable_dev("src/index.js", {
|
||||
experimental: { disableExperimentalWarning: true },
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await worker.stop();
|
||||
});
|
||||
|
||||
it("should return Hello World", async () => {
|
||||
const resp = await worker.fetch();
|
||||
if (resp) {
|
||||
const text = await resp.text();
|
||||
expect(text).toMatchInlineSnapshot(`"Hello World!"`);
|
||||
}
|
||||
});
|
||||
});
|
||||
24
cool-dawn-3d3b/node_modules/wrangler/templates/init-tests/test-vitest-new-worker.js
generated
vendored
Normal file
24
cool-dawn-3d3b/node_modules/wrangler/templates/init-tests/test-vitest-new-worker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { unstable_dev } from "wrangler";
|
||||
import { describe, expect, it, beforeAll, afterAll } from "vitest";
|
||||
|
||||
describe("Worker", () => {
|
||||
let worker;
|
||||
|
||||
beforeAll(async () => {
|
||||
worker = await unstable_dev("src/index.js", {
|
||||
experimental: { disableExperimentalWarning: true },
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await worker.stop();
|
||||
});
|
||||
|
||||
it("should return Hello World", async () => {
|
||||
const resp = await worker.fetch();
|
||||
if (resp) {
|
||||
const text = await resp.text();
|
||||
expect(text).toMatchInlineSnapshot(`"Hello World!"`);
|
||||
}
|
||||
});
|
||||
});
|
||||
25
cool-dawn-3d3b/node_modules/wrangler/templates/init-tests/test-vitest-new-worker.ts
generated
vendored
Normal file
25
cool-dawn-3d3b/node_modules/wrangler/templates/init-tests/test-vitest-new-worker.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { unstable_dev } from "wrangler";
|
||||
import type { UnstableDevWorker } from "wrangler";
|
||||
import { describe, expect, it, beforeAll, afterAll } from "vitest";
|
||||
|
||||
describe("Worker", () => {
|
||||
let worker: UnstableDevWorker;
|
||||
|
||||
beforeAll(async () => {
|
||||
worker = await unstable_dev("src/index.ts", {
|
||||
experimental: { disableExperimentalWarning: true },
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await worker.stop();
|
||||
});
|
||||
|
||||
it("should return Hello World", async () => {
|
||||
const resp = await worker.fetch();
|
||||
if (resp) {
|
||||
const text = await resp.text();
|
||||
expect(text).toMatchInlineSnapshot(`"Hello World!"`);
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue