nodejs-hands-on/templates/promise/promise.test.js

10 lines
218 B
JavaScript
Raw Normal View History

2023-12-19 16:50:59 +09:00
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);
});