also looking at this
fix(ci): unblock the three failing native lifecycle legs
#37
4 files
+130
-20
| @@ -2,7 +2,7 @@ import { afterEach, describe, expect, it } from 'bun:test' | ||
| 2 | 2 | import { chmodSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs' |
| 3 | 3 | import { tmpdir } from 'node:os' |
| 4 | 4 | import { join } from 'node:path' |
| 5 | import { codesignArguments, dmgCapacityMegabytes, dmgCreateArguments, formatPackagingCommandError, macOSInfoPlist, notarytoolArguments, packageApp, productbuildArguments, renderWixSource, shouldRetryHdiutil, windowsArchitecture, windowsExecutableName } from './package' | |
| 5 | import { candleArguments, codesignArguments, dmgCapacityMegabytes, dmgCreateArguments, formatPackagingCommandError, macOSInfoPlist, notarytoolArguments, packageApp, productbuildArguments, renderWixSource, shouldRetryHdiutil, windowsArchitecture, windowsExecutableName } from './package' | |
| 6 | 6 | |
| 7 | 7 | describe('Windows MSI packaging', () => { |
| 8 | 8 | it('renders a deterministic major-upgrade installer without shell interpolation', () => { |
| @@ -29,6 +29,16 @@ describe('Windows MSI packaging', () => { | ||
| 29 | 29 | expect(() => windowsExecutableName('CON')).toThrow('Reserved Windows application name') |
| 30 | 30 | }) |
| 31 | 31 | |
| 32 | it('compiles for the architecture the source declares', () => { | |
| 33 | // Without -arch, candle defaults to x86 and quietly produces a 32-bit | |
| 34 | // installer around a 64-bit payload — while the source it just compiled | |
| 35 | // says Platform="x64", ProgramFiles64Folder and Win64="yes". ICE80 would | |
| 36 | // catch the contradiction, but light runs with -sval. | |
| 37 | expect(candleArguments('x64', 'out.wixobj', 'in.wxs')).toEqual(['-nologo', '-arch', 'x64', '-out', 'out.wixobj', 'in.wxs']) | |
| 38 | expect(candleArguments('x86', 'out.wixobj', 'in.wxs')).toContain('x86') | |
| 39 | expect(candleArguments('arm64', 'out.wixobj', 'in.wxs')).toContain('arm64') | |
| 40 | }) | |
| 41 | ||
| 32 | 42 | it('renders explicit 32-bit metadata only when requested', () => { |
| 33 | 43 | const source = renderWixSource({ name: 'Craft', version: '1.2.3', manufacturer: 'Craft', architecture: 'x86' }, 'Craft.exe') |
| 34 | 44 | expect(source).toContain('Platform="x86"') |