File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/test/container-features Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -258,4 +258,24 @@ describe('Lockfile', function () {
258258 await cleanup ( ) ;
259259 }
260260 } ) ;
261+
262+ it ( 'outdated command should work with default workspace folder' , async ( ) => {
263+ const workspaceFolder = path . join ( __dirname , 'configs/lockfile-outdated-command' ) ;
264+ const absoluteTmpPath = path . resolve ( __dirname , 'tmp' ) ;
265+ const absoluteCli = `npx --prefix ${ absoluteTmpPath } devcontainer` ;
266+
267+ const originalCwd = process . cwd ( ) ;
268+ try {
269+ process . chdir ( workspaceFolder ) ;
270+ const res = await shellExec ( `${ absoluteCli } outdated --output-format json` ) ;
271+ const response = JSON . parse ( res . stdout ) ;
272+
273+ // Should have same structure as the test with explicit workspace-folder
274+ assert . ok ( response . features ) ;
275+ assert . ok ( response . features [ 'ghcr.io/devcontainers/features/git:1.0' ] ) ;
276+ assert . strictEqual ( response . features [ 'ghcr.io/devcontainers/features/git:1.0' ] . current , '1.0.4' ) ;
277+ } finally {
278+ process . chdir ( originalCwd ) ;
279+ }
280+ } ) ;
261281} ) ;
You can’t perform that action at this time.
0 commit comments