summaryrefslogtreecommitdiff
path: root/packages/webapi/test/fetch.js
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2022-03-07 21:37:50 +0000
committerGravatar GitHub Actions <actions@github.com> 2022-03-07 21:37:50 +0000
commit63adaeec3420e68236613848293881721231d58b (patch)
treee1fe3060ae2ddaa39b1c4b88164466c602c39aed /packages/webapi/test/fetch.js
parentf18ee36dc0abdc5c8ec87734de7962966d16fe65 (diff)
downloadastro-63adaeec3420e68236613848293881721231d58b.tar.gz
astro-63adaeec3420e68236613848293881721231d58b.tar.zst
astro-63adaeec3420e68236613848293881721231d58b.zip
[ci] yarn format
Diffstat (limited to 'packages/webapi/test/fetch.js')
-rw-r--r--packages/webapi/test/fetch.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/packages/webapi/test/fetch.js b/packages/webapi/test/fetch.js
index 08d7c9297..48c2f688e 100644
--- a/packages/webapi/test/fetch.js
+++ b/packages/webapi/test/fetch.js
@@ -7,9 +7,9 @@ test(() => {
name: 'Fetch functionality',
test() {
const target = {}
-
+
polyfill(target)
-
+
assert.equal(Reflect.has(target, 'fetch'), true)
assert.equal(typeof target.fetch, 'function')
},
@@ -18,7 +18,7 @@ test(() => {
name: 'Fetch with https',
async test() {
const target = {}
-
+
polyfill(target)
const { fetch } = target
@@ -36,7 +36,7 @@ test(() => {
name: 'Fetch with file',
async test() {
const target = {}
-
+
polyfill(target)
const { fetch } = target
@@ -62,7 +62,7 @@ test(() => {
name: 'Fetch with missing file',
async test() {
const target = {}
-
+
polyfill(target)
const { fetch } = target
@@ -84,7 +84,7 @@ test(() => {
name: 'Fetch with (file) Request',
async test() {
const target = {}
-
+
polyfill(target)
const { Request, fetch } = target
@@ -104,7 +104,7 @@ test(() => {
name: 'Fetch with relative file',
async test() {
const target = {}
-
+
polyfill(target)
const { fetch } = target
@@ -120,14 +120,16 @@ test(() => {
name: 'Fetch with data',
async test() {
const target = {}
-
+
polyfill(target)
const { fetch } = target
- const jsonURI = `data:application/json,${encodeURIComponent(JSON.stringify({
- name: '@astrojs/webapi'
- }))}`
+ const jsonURI = `data:application/json,${encodeURIComponent(
+ JSON.stringify({
+ name: '@astrojs/webapi',
+ })
+ )}`
const response = await fetch(jsonURI)