@@ -16,7 +16,7 @@ const pkg = require('../../package.json');
1616describe ( 'Dev Containers CLI' , function ( ) {
1717 this . timeout ( '120s' ) ;
1818
19- const tmp = path . relative ( process . cwd ( ) , path . join ( __dirname , 'tmp' ) ) ;
19+ const tmp = path . join ( __dirname , 'tmp' ) ;
2020 const cli = `npx --prefix ${ tmp } devcontainer` ;
2121
2222 before ( 'Install' , async ( ) => {
@@ -424,7 +424,7 @@ describe('Dev Containers CLI', function () {
424424 assert . strictEqual ( envListToObj ( details . Config . Env ) . SUBFOLDER_CONFIG_IMAGE_ENV , 'true' ) ;
425425 } ) ;
426426
427- it ( 'should apply build options' , async ( ) => {
427+ it . only ( 'should apply build options' , async ( ) => {
428428 const testFolder = `${ __dirname } /configs/dockerfile-with-target` ;
429429 const res = await shellExec ( `${ cli } build --workspace-folder ${ testFolder } ` ) ;
430430 const response = JSON . parse ( res . stdout ) ;
@@ -433,5 +433,15 @@ describe('Dev Containers CLI', function () {
433433 const details = JSON . parse ( ( await shellExec ( `docker inspect ${ response . imageName } ` ) ) . stdout ) [ 0 ] as ImageDetails ;
434434 assert . strictEqual ( details . Config . Labels ?. test_build_options , 'success' ) ;
435435 } ) ;
436+
437+ it . only ( 'should build with default workspace folder' , async ( ) => {
438+ const testFolder = `${ __dirname } /configs/dockerfile-with-target` ;
439+ const res = await shellExec ( `${ cli } build` , { cwd : testFolder } ) ;
440+ const response = JSON . parse ( res . stdout ) ;
441+ assert . equal ( response . outcome , 'success' ) ;
442+ assert . ok ( response . imageName ) ;
443+ const details = JSON . parse ( ( await shellExec ( `docker inspect ${ response . imageName } ` ) ) . stdout ) [ 0 ] as ImageDetails ;
444+ assert . strictEqual ( details . Config . Labels ?. test_build_options , 'success' ) ;
445+ } ) ;
436446 } ) ;
437447} ) ;
0 commit comments