Skip to content

Commit

Permalink
list dist?
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Nov 23, 2023
1 parent a951032 commit 2be80ce
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bindings/updater/nodejs/__test__/index.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test("it works", async (t) => {
const buildApp = async (version, updaterFormats) => {
await writeFile(
join(appDir, "dist", "ver.js"),
`module.exports.version = "${version}";`,
`module.exports.version = "${version}";`
);

try {
Expand All @@ -47,7 +47,7 @@ test("it works", async (t) => {
CARGO_PACKAGER_SIGN_PRIVATE_KEY: UPDATER_PRIVATE_KEY,
CARGO_PACKAGER_SIGN_PRIVATE_KEY_PASSWORD: "",
},
},
}
);
} catch (e) {
console.error("failed to package app");
Expand All @@ -58,7 +58,7 @@ test("it works", async (t) => {
// bundle app update
await buildApp(
"1.0.0",
isWindows ? ["nsis", "wix"] : isMacos ? ["app"] : ["appimage"],
isWindows ? ["nsis", "wix"] : isMacos ? ["app"] : ["appimage"]
);

const packgePaths = (version) => {
Expand All @@ -79,8 +79,7 @@ test("it works", async (t) => {
};

for (const [updaterFormat, outPackagePath] of packgePaths("1.0.0")) {
const info = parse(outUpdaterPath);
console.log(await readdir(info.dir));
console.log(await readdir(join(appDir, "dist")));
const outUpdaterPath = (await stat(outPackagePath)).isDirectory()
? `${outPackagePath}${extname(outPackagePath)}.tar.gz`
: outPackagePath;
Expand Down Expand Up @@ -149,7 +148,7 @@ test("it works", async (t) => {
? "updater-app-test.exe"
: isMacos
? "PackagerAppUpdaterTestNodejs.app/Contents/MacOS/cargo-packager-updater-app-test"
: `updater-app-test_${version}_x86_64.AppImage`,
: `updater-app-test_${version}_x86_64.AppImage`
);

// wait until the update is finished and the new version has been installed
Expand Down Expand Up @@ -178,7 +177,7 @@ test("it works", async (t) => {
counter += 1;
if (counter == 10) {
console.error(
"updater test timedout and couldn't verify the update has happened",
"updater test timedout and couldn't verify the update has happened"
);
break;
}
Expand Down

0 comments on commit 2be80ce

Please sign in to comment.