Skip to content

Commit

Permalink
test: rename Contents/MacOS/nwjs to `Contents/MacOS/${options.app.n…
Browse files Browse the repository at this point in the history
…ame}`
  • Loading branch information
ayushmanchhabra committed Oct 16, 2023
1 parent fdb4e2a commit f8f971e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ export async function build(
);
}

// TODO: do not rely on symlinks - use actual file paths.

try {
// Rename nwjs.app executable to ${options.app.name}.app
await rename(
Expand Down
12 changes: 11 additions & 1 deletion test/e2e/osx.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,21 @@ describe("osx specific tests", () => {
await nwbuild(nwOptions);
});

it("renames nwjs.app to `options.app.name`", () => {
it("renames nwjs.app to `options.app.name`.app", () => {
const appName = basename(
resolve(nwOptions.outDir, `${nwOptions.app.name}.app`),
".app",
);

equal(appName, "demo");
});

it("renames Contents/MacOS/nwjs to Contents/MacOS/${options.app.name}", () => {
const appName = basename(
resolve(nwOptions.outDir, `${nwOptions.app.name}.app`, "Contents", "MacOS", nwOptions.app.name)
);

equal(appName, "demo");
});

});

0 comments on commit f8f971e

Please sign in to comment.