From c6193bb67fa32d750b42f9a8a7d44db507126519 Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com> Date: Sun, 18 Aug 2024 11:17:30 +0530 Subject: [PATCH] chore(test): rename fixtures dir --- .gitignore | 4 ++-- package.json | 2 +- src/get/decompress.test.js | 2 +- src/get/ffmpeg.test.js | 2 +- src/get/node.test.js | 2 +- src/get/nw.test.js | 2 +- src/get/request.test.js | 2 +- test/{fixture => fixtures}/app/icon.icns | Bin test/{fixture => fixtures}/app/icon.ico | Bin test/{fixture => fixtures}/app/icon.png | Bin test/{fixture => fixtures}/app/index.html | 0 test/{fixture => fixtures}/app/package.json | 0 test/{fixture => fixtures}/demo.js | 0 test/specs/bld.test.js | 6 +++--- 14 files changed, 11 insertions(+), 11 deletions(-) rename test/{fixture => fixtures}/app/icon.icns (100%) rename test/{fixture => fixtures}/app/icon.ico (100%) rename test/{fixture => fixtures}/app/icon.png (100%) rename test/{fixture => fixtures}/app/index.html (100%) rename test/{fixture => fixtures}/app/package.json (100%) rename test/{fixture => fixtures}/demo.js (100%) diff --git a/.gitignore b/.gitignore index cbab20330..4141dd47b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ coverage node_modules -test/fixture/cache -test/fixture/out +tests/fixtures/cache +tests/fixtures/out diff --git a/package.json b/package.json index c676a9bc6..8c118587d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "docs": "jsdoc -d docs ./README.md ./src/index.js ./src/get.js ./src/run.js ./src/bld.js", "test": "vitest run --coverage", "test:cov": "vitest --coverage.enabled true", - "demo": "cd test/fixture && node demo.js", + "demo": "cd test/fixtures && node demo.js", "license-check": "jsgl --local ." }, "devDependencies": { diff --git a/src/get/decompress.test.js b/src/get/decompress.test.js index 444e61e2d..9eabe1881 100644 --- a/src/get/decompress.test.js +++ b/src/get/decompress.test.js @@ -13,7 +13,7 @@ describe("get/decompress", async function () { let nwFilePath = ''; let nwDirPath = ''; - let nwOutPath = "./test/fixture/cache"; + let nwOutPath = "./test/fixtures/cache"; afterAll(async function () { await fs.promises.rm(nwOutPath, { recursive: true, force: true }); diff --git a/src/get/ffmpeg.test.js b/src/get/ffmpeg.test.js index 8f6c5791c..115b05ac8 100644 --- a/src/get/ffmpeg.test.js +++ b/src/get/ffmpeg.test.js @@ -21,7 +21,7 @@ describe("get/ffmpeg", function () { "0.83.0", util.PLATFORM_KV[process.platform], util.ARCH_KV[process.arch], - "./test/fixture" + "./test/fixtures" ); expect(util.fileExists(ffmpegFile)).resolves.toBe(true); }, Infinity); diff --git a/src/get/node.test.js b/src/get/node.test.js index 527cf94d8..82df3bba3 100644 --- a/src/get/node.test.js +++ b/src/get/node.test.js @@ -18,7 +18,7 @@ describe("get/node", function () { nodeFile = await node( "https://dl.nwjs.io", "0.83.0", - "./test/fixture" + "./test/fixtures" ); expect(util.fileExists(nodeFile)).resolves.toBe(true); }, Infinity); diff --git a/src/get/nw.test.js b/src/get/nw.test.js index e937598ef..a8806449d 100644 --- a/src/get/nw.test.js +++ b/src/get/nw.test.js @@ -22,7 +22,7 @@ describe("get/nw", function () { "sdk", util.PLATFORM_KV[process.platform], util.ARCH_KV[process.arch], - "./test/fixture" + "./test/fixtures" ); expect(util.fileExists(nwFile)).resolves.toBe(true); }, Infinity); diff --git a/src/get/request.test.js b/src/get/request.test.js index 3606b8e37..dd9686347 100644 --- a/src/get/request.test.js +++ b/src/get/request.test.js @@ -7,7 +7,7 @@ import request from "./request.js"; describe.skip("get/request", function () { let url = "https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json" - const filePath = "./test/fixture/cache/request.test.json"; + const filePath = "./test/fixtures/cache/request.test.json"; it("downloads from specific url", async function () { await request(url, filePath); diff --git a/test/fixture/app/icon.icns b/test/fixtures/app/icon.icns similarity index 100% rename from test/fixture/app/icon.icns rename to test/fixtures/app/icon.icns diff --git a/test/fixture/app/icon.ico b/test/fixtures/app/icon.ico similarity index 100% rename from test/fixture/app/icon.ico rename to test/fixtures/app/icon.ico diff --git a/test/fixture/app/icon.png b/test/fixtures/app/icon.png similarity index 100% rename from test/fixture/app/icon.png rename to test/fixtures/app/icon.png diff --git a/test/fixture/app/index.html b/test/fixtures/app/index.html similarity index 100% rename from test/fixture/app/index.html rename to test/fixtures/app/index.html diff --git a/test/fixture/app/package.json b/test/fixtures/app/package.json similarity index 100% rename from test/fixture/app/package.json rename to test/fixtures/app/package.json diff --git a/test/fixture/demo.js b/test/fixtures/demo.js similarity index 100% rename from test/fixture/demo.js rename to test/fixtures/demo.js diff --git a/test/specs/bld.test.js b/test/specs/bld.test.js index c4b3eb54c..3c505a81b 100644 --- a/test/specs/bld.test.js +++ b/test/specs/bld.test.js @@ -15,7 +15,7 @@ describe.skip("build test suite", async () => { let driver = undefined; const nwOptions = { - srcDir: "test/fixture/app", + srcDir: "test/fixtures/app", mode: "build", version: "0.83.0", flavor: "sdk", @@ -23,8 +23,8 @@ describe.skip("build test suite", async () => { arch: util.ARCH_KV[process.arch], downloadUrl: "https://dl.nwjs.io", manifestUrl: "https://nwjs.io/versions", - outDir: "test/fixture/out/app", - cacheDir: "test/fixture/cache", + outDir: "test/fixtures/out/app", + cacheDir: "test/fixtures/cache", cache: true, ffmpeg: false, glob: false,