Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondkmp committed Oct 6, 2024
1 parent ceef74c commit 861f234
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/src/ignoreTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ test.ifDevOrLinuxCi(
targets: Platform.LINUX.createTarget(DIR_TARGET),
config: {
asar: false,
files: ["**/*", "**/submodule-1-test/node_modules/**"],
},
},
{
Expand All @@ -126,11 +127,18 @@ test.ifDevOrLinuxCi(
...data.dependencies,
}
}),
outputFile(path.join(projectDir, "submodule-1-test", "node_modules", "package.json"), "{}"),
outputFile(path.join(projectDir, "others", "node_modules", "package.json"), "{}"),
])
},
packed: context => {
return Promise.all([
assertThat(path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "node_modules", "electron-updater", "node_modules")).isDirectory(),
assertThat(path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "others", "node_modules")).doesNotExist(),
assertThat(path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "submodule-1-test", "node_modules")).isDirectory(),
assertThat(
path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "submodule-1-test", "node_modules", "package.json")
).isFile(),
])
},
}
Expand Down

0 comments on commit 861f234

Please sign in to comment.