Files
orca/config/scripts/mobile-web-app-module-closure.test.mjs
T
Neil 3f81541188 Support restarting Windows Orca as administrator (#28073)
* feat(windows): add administrator PowerShell terminal setting

* fix(settings): localize administrator terminal search keywords

* fix(windows): restrict elevated terminal host to Orca's runtime and requesting account

* fix(windows): harden administrator terminal routing, inventory and restore

* fix(build): build the Windows agent hook when electron-builder packages Windows

* fix(build): build the packaged Windows agent hook for the target architecture

* fix(windows): accept the development terminal runtime and test real elevation in CI

* feat(windows): show administrator status and restart instructions

* fix(settings): localize administrator mode search keywords

* test(settings): isolate the desktop permission section in shell picker tests

* Add Windows administrator restart and simplify Terminal settings

* Keep administrator restart silent and settings actions within narrow panes

* Keep Windows shell choices and permission guides usable at minimum width

* Prevent later restarts from replaying administrator terminal reset

* Fix CI route resolution and transient Windows fixture cleanup
2026-10-13 18:06:05 -07:00

21 lines
930 B
JavaScript

import { mkdir, realpath, writeFile } from 'node:fs/promises'
import { join } from 'node:path'
import { expect, it } from 'vitest'
import { mobileWebAppModuleClosure } from './build-mobile-web-app-bundle.mjs'
import { withScratch } from './mobile-web-app-bundle-test-fixture.mjs'
it.each(['app/_layout', 'app/_layout.tsx'])(
'resolves %s from the supplied directory without a TypeScript baseUrl',
async (entry) => {
await withScratch(async (scratch) => {
const root = await realpath(scratch)
await mkdir(join(root, 'app'))
await writeFile(join(root, 'app/_layout.tsx'), "export default 'native'")
await writeFile(join(root, 'app/_layout.web.tsx'), "export default 'web'")
const closure = await mobileWebAppModuleClosure([entry], { absWorkingDir: root })
expect(closure.modules).toEqual(['app/_layout.web.tsx'])
expect(closure.local).toEqual(['app/_layout.web.tsx'])
})
}
)