Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class WebInstallerTarget extends NsisTarget {
}

appPackageUrl = computeDownloadUrl(publishConfigs[0], null, packager)
defines.APP_PACKAGE_URL_IS_INCOMPLETE = null
}

defines.APP_PACKAGE_URL_IS_INCOMPLETE = null
defines.APP_PACKAGE_URL = appPackageUrl
}

Expand Down
23 changes: 22 additions & 1 deletion test/src/windows/webInstallerTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Arch, Platform } from "electron-builder"
import { app } from "../helpers/packTester"
import { app, assertPack } from "../helpers/packTester"

// tests are heavy, to distribute tests across CircleCI machines evenly, these tests were moved from oneClickInstallerTest

Expand Down Expand Up @@ -52,3 +52,24 @@ test("web installer, safe name on github", ({ expect }) =>
},
},
}))

test("web installer, appPackageUrl is complete URL (no arch paths appended)", ({ expect }) =>
assertPack(
expect,
"test-app-one",
{
targets: Platform.WINDOWS.createTarget(["nsis-web"], Arch.x64),
config: {
publish: null,
nsisWeb: {
appPackageUrl: "https://example.com/download/latest",
},
},
effectiveOptionComputed: async it => {
const defines = it[0]
expect(defines.APP_PACKAGE_URL).toEqual("https://example.com/download/latest")
expect(defines.APP_PACKAGE_URL_IS_INCOMPLETE).toBeUndefined()
return true
},
}
))
Loading