mirror of
https://github.com/cloudflare/workers-rs.git
synced 2025-12-08 18:01:59 +00:00
17 lines
487 B
TypeScript
17 lines
487 B
TypeScript
import { describe, test, expect } from "vitest";
|
|
import { mf, mfUrl } from "./mf";
|
|
|
|
describe("JS Snippets", () => {
|
|
test("performance.now", async () => {
|
|
const resp = await mf.dispatchFetch(`${mfUrl}js_snippets/now`);
|
|
const text = await resp.text();
|
|
expect(text).toMatch(/^now: \d+$$/);
|
|
});
|
|
|
|
test("console.log", async () => {
|
|
const resp = await mf.dispatchFetch(`${mfUrl}js_snippets/log`);
|
|
const text = await resp.text();
|
|
expect(text).toBe("OK");
|
|
});
|
|
});
|