11import assert from 'node:assert/strict' ;
22import fs from 'node:fs' ;
3+ import createDebug from 'debug' ;
34import { type SmokeTestsContext } from '../context' ;
45import { getInstaller } from '../installers' ;
56import { createSandbox } from '../directories' ;
67import { getTestSubject } from '../test-subject' ;
78import { executeAsync } from '../execute' ;
89import { startAutoUpdateServer } from './update-server' ;
910
11+ const debug = createDebug ( 'compass:smoketests:auto-update-from' ) ;
12+
1013export async function testAutoUpdateFrom ( context : SmokeTestsContext ) {
1114 const sandboxPath = createSandbox ( ) ;
1215 const { kind, appName, filepath, autoUpdatable } = await getTestSubject ( {
@@ -61,7 +64,7 @@ export async function testAutoUpdateFrom(context: SmokeTestsContext) {
6164 }
6265 ) ;
6366 } finally {
64- console . log ( 'Stopping auto-update server' ) ;
67+ debug ( 'Stopping auto-update server' ) ;
6568 server . close ( ) ;
6669 delete process . env . UPDATE_CHECKER_ALLOW_DOWNGRADES ;
6770 }
@@ -70,9 +73,9 @@ export async function testAutoUpdateFrom(context: SmokeTestsContext) {
7073 }
7174 } finally {
7275 if ( context . skipCleanup ) {
73- console . log ( `Skipped cleaning up sandbox: ${ sandboxPath } ` ) ;
76+ debug ( `Skipped cleaning up sandbox: ${ sandboxPath } ` ) ;
7477 } else {
75- console . log ( `Cleaning up sandbox: ${ sandboxPath } ` ) ;
78+ debug ( `Cleaning up sandbox: ${ sandboxPath } ` ) ;
7679 fs . rmSync ( sandboxPath , { recursive : true } ) ;
7780 }
7881 }
0 commit comments