MCPcopy
hub / github.com/electron-userland/electron-builder / createBuildResourcesTest

Function createBuildResourcesTest

test/src/ExtraBuildTest.ts:8–30  ·  view source on GitHub ↗
(packagerOptions: PackagerOptions)

Source from the content-addressed store, hash-verified

6import { expectUpdateMetadata } from "./helpers/winHelper"
7
8function createBuildResourcesTest(packagerOptions: PackagerOptions) {
9 return app({
10 ...packagerOptions,
11 config: {
12 publish: null,
13 directories: {
14 buildResources: "custom",
15 // tslint:disable:no-invalid-template-strings
16 output: "customDist/${channel}",
17 // https://github.com/electron-userland/electron-builder/issues/601
18 app: ".",
19 },
20 nsis: {
21 differentialPackage: false,
22 },
23 },
24 }, {
25 packed: async context => {
26 await assertThat(path.join(context.projectDir, "customDist", "latest")).isDirectory()
27 },
28 projectDirCreated: projectDir => move(path.join(projectDir, "build"), path.join(projectDir, "custom"))
29 })
30}
31
32test.ifAll.ifNotWindows("custom buildResources and output dirs: mac", createBuildResourcesTest({mac: ["dir"]}))
33test.ifAll.ifNotCiMac("custom buildResources and output dirs: win", createBuildResourcesTest({win: ["nsis"]}))

Callers 1

ExtraBuildTest.tsFile · 0.85

Calls 3

appFunction · 0.90
assertThatFunction · 0.90
isDirectoryMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…