UNPKG

534 BJavaScriptView Raw
1import fs from "node:fs";
2
3import { afterEach, describe, expect, it } from "vitest";
4
5import node from "./node.js";
6import util from "./util.js";
7
8describe("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});