Skip to content

Commit 72cd127

Browse files
chore: move tests dir
1 parent 27d01c9 commit 72cd127

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

.github/workflows/e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ jobs:
3838
run: npm run lint
3939
- name: Link module
4040
run: npm link nw-builder
41-
- name: Run Selenium tests
42-
run: npm run test:e2e
41+
- name: Run tests
42+
run: npm run test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"scripts": {
4545
"lint": "eslint src/get.js",
4646
"docs": "jsdoc -d docs ./src/get.js ./src/run.js ./src/bld.js",
47-
"test:e2e": "node test/e2e/index.js",
47+
"test": "node test/index.js",
4848
"demo": "cd test/fixture && node demo.js"
4949
},
5050
"devDependencies": {

src/get.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import util from "./util.js";
1919
* @property {"ia32" | "x64" | "arm64"} [options.arch] Target arch
2020
* @property {string} [options.downloadUrl = "https://dl.nwjs.io"] Download server
2121
* @property {string} [options.cacheDir = "./cache"] Cache directory
22-
* @property {string} [options.outDir = "./out"] Out directory
2322
* @property {boolean} [options.cache = true] If false, remove cache and redownload.
2423
* @property {boolean} [options.ffmpeg = false] If true, ffmpeg is not downloaded.
2524
* @property {false | "gyp"} [options.nativeAddon = false] Rebuild native modules
@@ -204,10 +203,10 @@ const getFfmpeg = async (options) => {
204203
// If options.ffmpeg is true, then download ffmpeg.
205204
options.downloadUrl = "https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt/releases/download";
206205
let url = `${options.downloadUrl}/${options.version}/${options.version}-${options.platform}-${options.arch}.zip`;
207-
const out = path.resolve(cacheDir, `ffmpeg-v${options.version}-${options.platform}-${options.arch}.zip`);
206+
const out = path.resolve(options.cacheDir, `ffmpeg-v${options.version}-${options.platform}-${options.arch}.zip`);
208207

209208
// If options.cache is false, remove cache.
210-
if (cache === false) {
209+
if (options.cache === false) {
211210
await fsm.rm(out, {
212211
recursive: true,
213212
force: true,

test/e2e/addon.js renamed to test/addon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import nwbuild from "nw-builder";
77
import { By } from "selenium-webdriver";
88
import chrome from "selenium-webdriver/chrome.js";
99

10-
import util from "../../src/util.js";
10+
import util from "../src/util.js";
1111

1212
const { Driver, ServiceBuilder, Options } = chrome;
1313

File renamed without changes.

test/e2e/mode.js renamed to test/mode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import nwbuild from "nw-builder";
77
import { By } from "selenium-webdriver";
88
import chrome from "selenium-webdriver/chrome.js";
99

10-
import util from "../../src/util.js";
10+
import util from "../src/util.js";
1111

1212
const { Driver, ServiceBuilder, Options } = chrome;
1313

0 commit comments

Comments
 (0)