1 | import fs from "node:fs";
|
2 |
|
3 | import { afterEach, describe, expect, it } from "vitest";
|
4 |
|
5 | import node from "./node.js";
|
6 | import util from "./util.js";
|
7 |
|
8 | describe("get/node", function () {
|
9 |
|
10 | let nodeFile = '';
|
11 |
|
12 | afterEach(function () {
|
13 | fs.promises.rm(nodeFile, { recursive: true, force: true });
|
14 | });
|
15 |
|
16 | it("downloades Node headers", async function () {
|
17 | nodeFile = await node(
|
18 | "https://dl.nwjs.io",
|
19 | "0.83.0",
|
20 | "./test/fixture"
|
21 | );
|
22 | expect(util.fileExists(nodeFile)).resolves.toBe(true);
|
23 | }, Infinity);
|
24 | });
|