@@ -23,8 +23,6 @@ import { Execution } from "@executablemd/core/api";
2323import type { Plugin , PluginInstallation } from "@executablemd/core/api" ;
2424import { cwd } from "@executablemd/runtime" ;
2525import { cliBase } from "@executablemd/test-support/launch" ;
26- import { runCli , runShell , shellQuote } from "@executablemd/test-support/launch" ;
27- import { writeTextFile } from "@effectionx/fs" ;
2826import { useTempDirectory } from "@executablemd/test-support/temp" ;
2927import type { HelperAssembly } from "@executablemd/git/credential-helper" ;
3028import { planComponentDeclaration } from "../src/plan-component.ts" ;
@@ -50,50 +48,6 @@ import { denoRunRepositories } from "../src/deno-repositories.ts";
5048 * configured.
5149 */
5250describe ( "C1 — the native host a run child initializes" , ( ) => {
53- it ( "L4: source entrypoints install the loader and carry it into detached run children" , function * ( ) {
54- const project = yield * useTempDirectory ( "xmd-module-host-" ) ;
55- const repository = fileURLToPath ( new URL ( "../../../" , import . meta. url ) ) ;
56- yield * writeTextFile (
57- join ( project , "helper.ts" ) ,
58- 'export const value: string = "host-typed-component";' ,
59- ) ;
60- yield * writeTextFile (
61- join ( project , "Typed.ts" ) ,
62- 'import { value } from "./helper.ts";\nexport default function*() { const typed: string = value; return typed; }' ,
63- ) ;
64- yield * writeTextFile (
65- join ( project , "README.test.md" ) ,
66- [
67- '<Test name="host module selection">' ,
68- '<Typed as="direct" />' ,
69- '<AssertEquals actual={direct} expected="host-typed-component" />' ,
70- '<Execution host="run" source={"<Typed />"} as="child">' ,
71- '<CollectOutput as="output" />' ,
72- '<AssertStringIncludes actual={output} expected="host-typed-component" />' ,
73- "</Execution>" ,
74- "</Test>" ,
75- ] . join ( "\n" ) ,
76- ) ;
77- const args = [ "test" , "README.test.md" , "--include" , project ] ;
78- console . log ( JSON . stringify ( { argv : [ ...cliBase ( ) , ...args ] , cwd : project } ) ) ;
79- const deno = yield * runCli ( args , { cwd : project } ) . join ( ) ;
80- expect ( { code : deno . code , stderr : deno . stderr } ) . toEqual ( { code : 0 , stderr : "" } ) ;
81- for ( const argv of [
82- [
83- "tsx" ,
84- "--tsconfig" ,
85- join ( repository , "tsconfig.node.json" ) ,
86- join ( repository , "packages/cli/src/node.ts" ) ,
87- ...args ,
88- ] ,
89- [ "bun" , join ( repository , "packages/cli/src/bun.ts" ) , ...args ] ,
90- ] ) {
91- console . log ( JSON . stringify ( { argv, cwd : project } ) ) ;
92- const result = yield * runShell ( argv . map ( shellQuote ) . join ( " " ) , { cwd : project } ) . join ( ) ;
93- expect ( { argv, code : result . code , stderr : result . stderr } ) . toMatchObject ( { argv, code : 0 } ) ;
94- }
95- } ) ;
96-
9751 /** A bare remote a child may clone without reaching a network. */
9852 function * useBareRemote ( home : string ) : Operation < string > {
9953 const parent = yield * until ( realpath ( yield * useTempDirectory ( "xmd-c1-remote-" ) ) ) ;
0 commit comments