@@ -14,7 +14,7 @@ export function describeTests1({ text, options }: BuildKitOption) {
1414 describe ( 'Dev Containers CLI' , function ( ) {
1515 this . timeout ( '360s' ) ;
1616
17- const tmp = path . relative ( process . cwd ( ) , path . join ( __dirname , 'tmp' ) ) ;
17+ const tmp = path . join ( __dirname , 'tmp' ) ;
1818 const cli = `npx --prefix ${ tmp } devcontainer` ;
1919
2020 before ( 'Install' , async ( ) => {
@@ -30,12 +30,18 @@ export function describeTests1({ text, options }: BuildKitOption) {
3030 const testFolder = `${ __dirname } /configs/image` ;
3131 beforeEach ( async ( ) => containerId = ( await devContainerUp ( cli , testFolder , options ) ) . containerId ) ;
3232 afterEach ( async ( ) => await devContainerDown ( { containerId } ) ) ;
33- it ( 'should execute successfully' , async ( ) => {
33+ it . only ( 'should execute successfully' , async ( ) => {
3434 const res = await shellBufferExec ( `${ cli } exec --workspace-folder ${ testFolder } echo hi` ) ;
3535 assert . strictEqual ( res . code , 0 ) ;
3636 assert . equal ( res . signal , undefined ) ;
3737 assert . strictEqual ( res . stdout . toString ( ) , 'hi\n' ) ;
3838 } ) ;
39+ it . only ( 'should execute without a workspace folder' , async ( ) => {
40+ const res = await shellBufferExec ( `${ cli } exec echo hi` , { cwd : testFolder } ) ;
41+ assert . strictEqual ( res . code , 0 ) ;
42+ assert . equal ( res . signal , undefined ) ;
43+ assert . strictEqual ( res . stdout . toString ( ) , 'hi\n' ) ;
44+ } ) ;
3945 it ( 'should not run in a terminal' , async ( ) => {
4046 const res = await shellBufferExec ( `${ cli } exec --workspace-folder ${ testFolder } [ ! -t 1 ]` ) ;
4147 assert . strictEqual ( res . code , 0 ) ;
0 commit comments