nodejs-hands-on/templates/promise/promise.test.js
2023-12-19 16:50:59 +09:00

9 lines
218 B
JavaScript

import assert from "node:assert";
import test from "node:test";
const fetchData = () => Promise.resolve(42);
test("データは42", async () => {
const data = await fetchData();
assert.strictEqual(data, 42);
});