(packagerOptions: PackagerOptions)
| 6 | import { expectUpdateMetadata } from "./helpers/winHelper" |
| 7 | |
| 8 | function 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 | |
| 32 | test.ifAll.ifNotWindows("custom buildResources and output dirs: mac", createBuildResourcesTest({mac: ["dir"]})) |
| 33 | test.ifAll.ifNotCiMac("custom buildResources and output dirs: win", createBuildResourcesTest({win: ["nsis"]})) |
no test coverage detected
searching dependent graphs…