aboutsummaryrefslogtreecommitdiff
path: root/packages/astro/test/fixtures/fetch/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/test/fixtures/fetch/src')
-rw-r--r--packages/astro/test/fixtures/fetch/src/components/AlreadyImported.astro1
-rw-r--r--packages/astro/test/fixtures/fetch/src/components/AstroComponent.astro1
-rw-r--r--packages/astro/test/fixtures/fetch/src/components/CustomDeclaration.astro5
-rw-r--r--packages/astro/test/fixtures/fetch/src/components/JsxComponent.jsx7
-rw-r--r--packages/astro/test/fixtures/fetch/src/components/SvelteComponent.svelte1
-rw-r--r--packages/astro/test/fixtures/fetch/src/components/VueComponent.vue16
-rw-r--r--packages/astro/test/fixtures/fetch/src/pages/index.astro23
7 files changed, 54 insertions, 0 deletions
diff --git a/packages/astro/test/fixtures/fetch/src/components/AlreadyImported.astro b/packages/astro/test/fixtures/fetch/src/components/AlreadyImported.astro
new file mode 100644
index 000000000..40dd58012
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/components/AlreadyImported.astro
@@ -0,0 +1 @@
+<span id="already-imported">{typeof fetch}</span>
diff --git a/packages/astro/test/fixtures/fetch/src/components/AstroComponent.astro b/packages/astro/test/fixtures/fetch/src/components/AstroComponent.astro
new file mode 100644
index 000000000..e56cfd3cd
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/components/AstroComponent.astro
@@ -0,0 +1 @@
+<span id="astro-component">{typeof fetch}</span>
diff --git a/packages/astro/test/fixtures/fetch/src/components/CustomDeclaration.astro b/packages/astro/test/fixtures/fetch/src/components/CustomDeclaration.astro
new file mode 100644
index 000000000..7fdf16903
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/components/CustomDeclaration.astro
@@ -0,0 +1,5 @@
+---
+const fetch = 0;
+---
+
+<span id="custom-declaration">{typeof fetch}</span>
diff --git a/packages/astro/test/fixtures/fetch/src/components/JsxComponent.jsx b/packages/astro/test/fixtures/fetch/src/components/JsxComponent.jsx
new file mode 100644
index 000000000..071473ea9
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/components/JsxComponent.jsx
@@ -0,0 +1,7 @@
+import { h } from 'preact';
+
+export default function() {
+ return (
+ <span id="jsx">{ typeof fetch }</span>
+ );
+} \ No newline at end of file
diff --git a/packages/astro/test/fixtures/fetch/src/components/SvelteComponent.svelte b/packages/astro/test/fixtures/fetch/src/components/SvelteComponent.svelte
new file mode 100644
index 000000000..49f32acbb
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/components/SvelteComponent.svelte
@@ -0,0 +1 @@
+<span id="svelte">{ typeof fetch }</span>
diff --git a/packages/astro/test/fixtures/fetch/src/components/VueComponent.vue b/packages/astro/test/fixtures/fetch/src/components/VueComponent.vue
new file mode 100644
index 000000000..1ea2e2ccc
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/components/VueComponent.vue
@@ -0,0 +1,16 @@
+<template>
+ <span id="vue">{{ type }}</span>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+
+export default defineComponent({
+ setup() {
+ return {
+ type: typeof fetch
+ }
+ }
+})
+</script>
+
diff --git a/packages/astro/test/fixtures/fetch/src/pages/index.astro b/packages/astro/test/fixtures/fetch/src/pages/index.astro
new file mode 100644
index 000000000..944873d0c
--- /dev/null
+++ b/packages/astro/test/fixtures/fetch/src/pages/index.astro
@@ -0,0 +1,23 @@
+---
+import AlreadyImported from '../components/AlreadyImported.astro';
+import Test from '../components/AstroComponent.astro';
+import CustomDeclaration from '../components/CustomDeclaration.astro';
+import JsxComponent from '../components/JsxComponent.jsx';
+import SvelteComponent from '../components/SvelteComponent.svelte';
+import VueComponent from '../components/VueComponent.vue';
+---
+
+<html lang="en">
+<head>
+ <title>Global fetch</title>
+</head>
+<body>
+ <span id="astro-page">{typeof fetch}</span>
+ <Test />
+ <AlreadyImported />
+ <CustomDeclaration />
+ <JsxComponent />
+ <SvelteComponent />
+ <VueComponent />
+</body>
+</html>