aboutsummaryrefslogtreecommitdiff
path: root/test/macro
diff options
context:
space:
mode:
Diffstat (limited to 'test/macro')
-rw-r--r--test/macro/assert.tsx4
-rw-r--r--test/macro/fetchSync.tsx9
-rw-r--r--test/macro/hello-fetch-macro.tsx5
-rw-r--r--test/macro/loadMocks.tsx29
-rw-r--r--test/macro/macro.d.ts1
5 files changed, 0 insertions, 48 deletions
diff --git a/test/macro/assert.tsx b/test/macro/assert.tsx
deleted file mode 100644
index 8a6e4d822..000000000
--- a/test/macro/assert.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-// This logs the result at build time
-export function unreachable(call) {
- throw new Error(call.arguments[0].toString() || "unreachable");
-}
diff --git a/test/macro/fetchSync.tsx b/test/macro/fetchSync.tsx
deleted file mode 100644
index 51d1ca4f5..000000000
--- a/test/macro/fetchSync.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-// @ts-nocheck
-export async function fetchSync(ctx) {
- const str = ctx.arguments[0].toString();
-
- const response = await fetch(str);
- const text = await response.text();
-
- return <string value={text} />;
-}
diff --git a/test/macro/hello-fetch-macro.tsx b/test/macro/hello-fetch-macro.tsx
deleted file mode 100644
index fa0de4a9d..000000000
--- a/test/macro/hello-fetch-macro.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetchSync } from "macro:./fetchSync.tsx";
-
-const synchronousFetch = fetchSync(`https://example.com`);
-
-console.log(synchronousFetch);
diff --git a/test/macro/loadMocks.tsx b/test/macro/loadMocks.tsx
deleted file mode 100644
index 08e90dece..000000000
--- a/test/macro/loadMocks.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { unreachable } from "macro:./assert";
-
-if (process.env.NODE_ENV !== "test") unreachable("This module should only be imported in tests");
-
-export const mockData = {
- Copilot: {
- id: "Copilot",
- name: "Copilot",
- description: "Copilot",
- icon: "https://s3.amazonaws.com/copilot-public/images/icons/Copilot.png",
- color: "#00AEEF",
- type: "service",
- tags: ["copilot"],
- categories: ["copilot"],
- links: [
- {
- id: "Copilot",
- name: "Copilot",
- url: "https://copilot.io",
- description: "Copilot",
- icon: "https://s3.amazonaws.com/copilot-public/images/icons/Copilot.png",
- color: "#00AEEF",
- type: "service",
- tags: ["copilot"],
- categories: ["copilot"],
- },
- ],
- },
-};
diff --git a/test/macro/macro.d.ts b/test/macro/macro.d.ts
deleted file mode 100644
index ba02c03ed..000000000
--- a/test/macro/macro.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module "macro:*";