1
0
Fork 0
mirror of https://github.com/kou029w/nodejs-hands-on.git synced 2025-02-27 10:45:16 +00:00
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);
});