diff options
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/fetch.ts | 12 | ||||
| -rw-r--r-- | testdata/fetch.ts.out | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/testdata/fetch.ts b/testdata/fetch.ts new file mode 100644 index 000000000..24d413903 --- /dev/null +++ b/testdata/fetch.ts @@ -0,0 +1,12 @@ + +const request = async () => { + const response = await fetch('http://localhost:4545/package.json'); + const json = await response.json(); + console.log("expect deno:", json.name); + if (json.name !== "deno") { + throw Error("bad value" + json.name); + } +} + +request(); +console.log("fetch started"); diff --git a/testdata/fetch.ts.out b/testdata/fetch.ts.out new file mode 100644 index 000000000..b8ca9c598 --- /dev/null +++ b/testdata/fetch.ts.out @@ -0,0 +1,2 @@ +fetch started +expect deno: deno |
