@@ -154,6 +154,7 @@ describe('render release tooling', () => {
154154 it ( 'parsePlatformList accepts all and comma-separated platform lists' , ( ) => {
155155 expect ( parsePlatformList ( 'linux-x64,darwin-arm64' ) ) . toEqual ( [ 'linux-x64' , 'darwin-arm64' ] )
156156 expect ( parsePlatformList ( 'all' ) ) . toContain ( 'win-x64' )
157+ expect ( parsePlatformList ( 'all' ) ) . toContain ( 'win-x86' )
157158 expect ( ( ) => parsePlatformList ( 'freebsd-x64' ) ) . toThrow ( 'Unsupported platform' )
158159 } )
159160
@@ -213,7 +214,7 @@ describe('render release tooling', () => {
213214 expect ( verified . errors ) . toEqual ( [ ] )
214215 } )
215216
216- it ( 'buildHostPackage creates a Windows zip host archive' , async ( ) => {
217+ it ( 'buildHostPackage creates a Windows x86 zip host archive' , async ( ) => {
217218 const dir = await mkdtemp ( join ( tmpdir ( ) , 'easyink-render-package-' ) )
218219 const fakeGo = join ( dir , 'fake-go.mjs' )
219220 await writeFile ( fakeGo , `import { mkdirSync, writeFileSync } from 'node:fs'
@@ -224,19 +225,23 @@ if (outIndex === -1 || !process.argv[outIndex + 1]) {
224225 process.exit(1)
225226}
226227const out = process.argv[outIndex + 1]
228+ if (process.env.GOOS !== 'windows' || process.env.GOARCH !== '386') {
229+ process.exit(2)
230+ }
227231mkdirSync(dirname(out), { recursive: true })
228232writeFileSync(out, 'fake-host')
229233` )
230234
231235 const hostPackage = await buildHostPackage ( {
232- platform : 'win-x64 ' ,
236+ platform : 'win-x86 ' ,
233237 version : '0.1.0' ,
234238 outDir : join ( dir , 'out' ) ,
235239 goCommand : process . execPath ,
236240 goCommandArgs : [ fakeGo ] ,
237241 } )
238242
239243 expect ( hostPackage . archiveName ) . toMatch ( / \. z i p $ / )
244+ expect ( hostPackage . archiveName ) . toContain ( 'win-x86' )
240245 expect ( hostPackage . executable ) . toBe ( 'easyink-render.exe' )
241246 const verified = await verifyPackageReference (
242247 { size : hostPackage . size , sha256 : hostPackage . sha256 , executable : hostPackage . executable } ,
@@ -273,14 +278,15 @@ writeFileSync(out, 'fake-host')
273278 const outDir = join ( dir , 'out' )
274279
275280 const bundle = await buildBrowserBundle ( {
276- platform : 'win-x64 ' ,
281+ platform : 'win-x86 ' ,
277282 version : '148.0.7778.97' ,
278283 outDir,
279284 browserDir,
280285 executable : 'headless-shell' ,
281286 } )
282287
283288 expect ( bundle . archiveName ) . toMatch ( / \. z i p $ / )
289+ expect ( bundle . archiveName ) . toContain ( 'win-x86' )
284290 const verified = await verifyPackageReference (
285291 { size : bundle . size , sha256 : bundle . sha256 , executable : 'headless-shell' } ,
286292 bundle . archivePath ,
@@ -290,14 +296,14 @@ writeFileSync(out, 'fake-host')
290296
291297 it ( 'resolveChromeForTestingDownload maps EasyInk platforms to Chrome for Testing downloads' , ( ) => {
292298 const download = resolveChromeForTestingDownload ( cftIndex ( ) , {
293- platform : 'darwin-arm64 ' ,
299+ platform : 'win-x86 ' ,
294300 version : '148.0.7778.97' ,
295301 binary : 'chrome-headless-shell' ,
296302 } )
297303
298- expect ( download . cftPlatform ) . toBe ( 'mac-arm64 ' )
299- expect ( download . executable ) . toBe ( 'chrome-headless-shell' )
300- expect ( download . url ) . toBe ( 'https://example.test/chrome-headless-shell-mac-arm64 .zip' )
304+ expect ( download . cftPlatform ) . toBe ( 'win32 ' )
305+ expect ( download . executable ) . toBe ( 'chrome-headless-shell.exe ' )
306+ expect ( download . url ) . toBe ( 'https://example.test/chrome-headless-shell-win32 .zip' )
301307 } )
302308
303309 it ( 'resolveChromeForTestingDownload fails when a platform is not published' , ( ) => {
@@ -365,6 +371,7 @@ function cftIndex() {
365371 { platform : 'linux64' , url : 'https://example.test/chrome-headless-shell-linux64.zip' } ,
366372 { platform : 'mac-arm64' , url : 'https://example.test/chrome-headless-shell-mac-arm64.zip' } ,
367373 { platform : 'win64' , url : 'https://example.test/chrome-headless-shell-win64.zip' } ,
374+ { platform : 'win32' , url : 'https://example.test/chrome-headless-shell-win32.zip' } ,
368375 ] ,
369376 } ,
370377 } ,
0 commit comments