1
1
import assert from 'node:assert/strict' ;
2
2
import fs from 'node:fs' ;
3
+ import createDebug from 'debug' ;
3
4
import { type SmokeTestsContext } from '../context' ;
4
5
import { getInstaller } from '../installers' ;
5
6
import { createSandbox } from '../directories' ;
6
7
import { getTestSubject } from '../test-subject' ;
7
8
import { executeAsync } from '../execute' ;
8
9
import { startAutoUpdateServer } from './update-server' ;
9
10
11
+ const debug = createDebug ( 'compass:smoketests:auto-update-from' ) ;
12
+
10
13
export async function testAutoUpdateFrom ( context : SmokeTestsContext ) {
11
14
const sandboxPath = createSandbox ( ) ;
12
15
const { kind, appName, filepath, autoUpdatable } = await getTestSubject ( {
@@ -61,7 +64,7 @@ export async function testAutoUpdateFrom(context: SmokeTestsContext) {
61
64
}
62
65
) ;
63
66
} finally {
64
- console . log ( 'Stopping auto-update server' ) ;
67
+ debug ( 'Stopping auto-update server' ) ;
65
68
server . close ( ) ;
66
69
delete process . env . UPDATE_CHECKER_ALLOW_DOWNGRADES ;
67
70
}
@@ -70,9 +73,9 @@ export async function testAutoUpdateFrom(context: SmokeTestsContext) {
70
73
}
71
74
} finally {
72
75
if ( context . skipCleanup ) {
73
- console . log ( `Skipped cleaning up sandbox: ${ sandboxPath } ` ) ;
76
+ debug ( `Skipped cleaning up sandbox: ${ sandboxPath } ` ) ;
74
77
} else {
75
- console . log ( `Cleaning up sandbox: ${ sandboxPath } ` ) ;
78
+ debug ( `Cleaning up sandbox: ${ sandboxPath } ` ) ;
76
79
fs . rmSync ( sandboxPath , { recursive : true } ) ;
77
80
}
78
81
}
0 commit comments