|
1 | 1 | import test from "./helpers/avaEx" |
2 | 2 | import { assertPack, modifyPackageJson, platform } from "./helpers/packTester" |
3 | | -import { move, mkdirs, outputFile } from "fs-extra-p" |
| 3 | +import { move, mkdirs, outputFile, outputJson } from "fs-extra-p" |
4 | 4 | import { Promise as BluebirdPromise } from "bluebird" |
5 | 5 | import * as path from "path" |
6 | 6 | import { assertThat } from "./helpers/fileAssert" |
@@ -53,6 +53,23 @@ test("build in the app package.json", t => { |
53 | 53 | }), /'build' in the application package\.json .+/) |
54 | 54 | }) |
55 | 55 |
|
| 56 | +test("version from electron-prebuilt dependency", async () => { |
| 57 | + await assertPack("test-app-one", { |
| 58 | + platform: [process.platform], |
| 59 | + arch: process.arch, |
| 60 | + dist: false |
| 61 | + }, projectDir => { |
| 62 | + return BluebirdPromise.all([ |
| 63 | + outputJson(path.join(projectDir, "node_modules", "electron-prebuilt", "package.json"), { |
| 64 | + version: "0.37.2" |
| 65 | + }), |
| 66 | + modifyPackageJson(projectDir, data => { |
| 67 | + data.devDependencies = {} |
| 68 | + }) |
| 69 | + ]) |
| 70 | + }) |
| 71 | +}) |
| 72 | + |
56 | 73 | test("copy extra resource", async () => { |
57 | 74 | const platform = process.platform |
58 | 75 | const osName = Platform.fromNodePlatform(platform).buildConfigurationKey |
|
0 commit comments