Skip to content

Commit

Permalink
chore: move tests dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra committed Dec 7, 2023
1 parent 27d01c9 commit 72cd127
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
run: npm run lint
- name: Link module
run: npm link nw-builder
- name: Run Selenium tests
run: npm run test:e2e
- name: Run tests
run: npm run test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scripts": {
"lint": "eslint src/get.js",
"docs": "jsdoc -d docs ./src/get.js ./src/run.js ./src/bld.js",
"test:e2e": "node test/e2e/index.js",
"test": "node test/index.js",
"demo": "cd test/fixture && node demo.js"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions src/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import util from "./util.js";
* @property {"ia32" | "x64" | "arm64"} [options.arch] Target arch
* @property {string} [options.downloadUrl = "https://dl.nwjs.io"] Download server
* @property {string} [options.cacheDir = "./cache"] Cache directory
* @property {string} [options.outDir = "./out"] Out directory
* @property {boolean} [options.cache = true] If false, remove cache and redownload.
* @property {boolean} [options.ffmpeg = false] If true, ffmpeg is not downloaded.
* @property {false | "gyp"} [options.nativeAddon = false] Rebuild native modules
Expand Down Expand Up @@ -204,10 +203,10 @@ const getFfmpeg = async (options) => {
// If options.ffmpeg is true, then download ffmpeg.
options.downloadUrl = "https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt/releases/download";
let url = `${options.downloadUrl}/${options.version}/${options.version}-${options.platform}-${options.arch}.zip`;
const out = path.resolve(cacheDir, `ffmpeg-v${options.version}-${options.platform}-${options.arch}.zip`);
const out = path.resolve(options.cacheDir, `ffmpeg-v${options.version}-${options.platform}-${options.arch}.zip`);

// If options.cache is false, remove cache.
if (cache === false) {
if (options.cache === false) {
await fsm.rm(out, {
recursive: true,
force: true,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/addon.js → test/addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import nwbuild from "nw-builder";
import { By } from "selenium-webdriver";
import chrome from "selenium-webdriver/chrome.js";

import util from "../../src/util.js";
import util from "../src/util.js";

const { Driver, ServiceBuilder, Options } = chrome;

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/e2e/mode.js → test/mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import nwbuild from "nw-builder";
import { By } from "selenium-webdriver";
import chrome from "selenium-webdriver/chrome.js";

import util from "../../src/util.js";
import util from "../src/util.js";

const { Driver, ServiceBuilder, Options } = chrome;

Expand Down

0 comments on commit 72cd127

Please sign in to comment.