| 1 | import {create as linux} from '../../src/backends/linux.mjs'; |
| 2 | import {create as harmonyos} from '../../src/backends/harmonyos.mjs'; |
| 3 | |
| 4 | export const calls=[]; |
| 5 | export function create() { |
| 6 | const refused=(...args)=>{calls.push(args);throw new Error('Fixture refused an unexpected desktop runner');}; |
| 7 | const exec={run:refused,runOk:refused,have:refused,shell:refused,readFile:refused,pullFile:refused}; |
| 8 | const factory={linux,harmonyos}[process.env.CU_SELECTOR_PLATFORM]; |
| 9 | if(!factory)throw new Error('Unknown fixture backend'); |
| 10 | return factory({exec}); |
| 11 | } |
| 12 |