diff options
Diffstat (limited to 'test/macro/fetchSync.tsx')
-rw-r--r-- | test/macro/fetchSync.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/macro/fetchSync.tsx b/test/macro/fetchSync.tsx new file mode 100644 index 000000000..ebe1566e6 --- /dev/null +++ b/test/macro/fetchSync.tsx @@ -0,0 +1,8 @@ +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} />; +} |