From b8138b7a8fa22efcc02ad800da12074a897962fd Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 09:57:17 +0000 Subject: [PATCH] Test Workii pls --- package.json | 6 +- {test => src/__tests__}/base.test.ts | 3 +- test/intro.png | Bin 3851 -> 0 bytes yarn.lock | 163 ++++++++++++++++++++++----- 4 files changed, 143 insertions(+), 29 deletions(-) rename {test => src/__tests__}/base.test.ts (92%) delete mode 100644 test/intro.png diff --git a/package.json b/package.json index 9a42ae78..95651315 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "dist": "npm run build && electron-builder", "dist:all": "npm run build && electron-builder -mwl", "msft": "npm run build && electron-builder -c msft-package.json", - "postinstall": "electron-builder install-app-deps" + "postinstall": "electron-builder install-app-deps", + "test": "jest" }, "dependencies": { "@sentry/electron": "^2.5.4", @@ -68,7 +69,8 @@ "electron-webpack": "^2.8.2", "musickit-typescript": "^1.2.4", "playwright": "^1.18.1", - "typescript": "^4.5.4", + "ts-node": "^10.4.0", + "typescript": "^4.5.5", "vue-devtools": "^5.1.4", "webpack": "~5.65.0" }, diff --git a/test/base.test.ts b/src/__tests__/base.test.ts similarity index 92% rename from test/base.test.ts rename to src/__tests__/base.test.ts index 48474877..d5b44035 100644 --- a/test/base.test.ts +++ b/src/__tests__/base.test.ts @@ -1,8 +1,9 @@ import { _electron as electron } from "playwright"; import { test, expect } from "@playwright/test"; +import { join } from "path"; test("Launch electron app", async () => { - const electronApp = await electron.launch({ args: ["./build/index.js"] }); + const electronApp = await electron.launch({ args: [join(__dirname, "../../")] }); const appPath = await electronApp.evaluate(async ({ app }) => { // This runs in the main Electron process, parameter here is always diff --git a/test/intro.png b/test/intro.png deleted file mode 100644 index fa50249f565ca8ed0aad124db226548083e55d46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3851 zcmeAS@N?(olHy`uVBq!ia0y~yU;#3jA~@K9)E|K<%0P;-ILO_JVcj{ImkbPiM?GB} zLn`LHy>XEDfP%n*4U2!j=Lufmb!48x`!zFfG6R*{y!~wrq!@Ob2ayd7ATb6e9uUc4 z03sC*fXGpa(I6R345Qg#v}6F4hNETTXf**$2BQ@uC^L*U4Mv*=qh;b~HW+OhfJ(#B drUBKP27Ee=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 3933ac0a937d33c45e04a6750fcdd3e765eb2897d1da1307cd97ac52af093bcfb632ec0453a75000a65c8b5b7bdb32b1077050a186dcc556e62657cb592e6d49 + languageName: node + linkType: hard + "tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -10582,7 +10686,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.5.4": +"typescript@npm:^4.5.5": version: 4.5.5 resolution: "typescript@npm:4.5.5" bin: @@ -10592,7 +10696,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^4.5.4#~builtin": +"typescript@patch:typescript@^4.5.5#~builtin": version: 4.5.5 resolution: "typescript@patch:typescript@npm%3A4.5.5#~builtin::version=4.5.5&hash=493e53" bin: @@ -11460,6 +11564,13 @@ __metadata: languageName: node linkType: hard +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + "youtube-search-without-api-key@npm:^1.0.7": version: 1.0.7 resolution: "youtube-search-without-api-key@npm:1.0.7"