/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/unit_node/fetch_test.ts
18 строк
493 B
Kenta Moriuchi
chore: Happy New Year 2026 (#31748)
08 янв 2026, 18:28
Не верифицирован
08 янв 2026, 18:28
8193cf9
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; import { createReadStream } from "node:fs"; Deno.test("fetch node stream", async () => { const file = createReadStream("tests/testdata/assets/fixture.json"); const response = await fetch("http://localhost:4545/echo_server", { method: "POST", body: file, }); assertEquals( await response.text(), await Deno.readTextFile("tests/testdata/assets/fixture.json"), ); });