1- import { deepEqual , equal , match , notEqual } from 'node:assert' ;
1+ import { deepEqual , equal , match , notEqual } from 'node:assert/strict ' ;
22import { EventEmitter , once } from 'node:events' ;
33import { WriteStream , createWriteStream } from 'node:fs' ;
44import { mkdtemp , rm , unlink , writeFile } from 'node:fs/promises' ;
@@ -44,7 +44,7 @@ suite('WatchFileCommand', function () {
4444
4545 this . timeout ( 'win32' === platform ( ) ? 20000 : 2000 ) ;
4646
47- test ( 'watchFileCommandHandler - smoke test' , async function ( ) {
47+ test ( 'smoke test' , async function ( ) {
4848 const filename = __filename ;
4949
5050 const [ editor ] = await Promise . all ( [
@@ -56,7 +56,7 @@ suite('WatchFileCommand', function () {
5656 match ( editor ?. document . fileName ?? '' , new RegExp ( `Watch ${ filename . replace ( / \\ / gu, '\\\\' ) } $` , 'u' ) ) ;
5757 } ) ;
5858
59- test ( 'watchFileCommandHandler - react to file creation' , async function ( ) {
59+ test ( 'react to file creation' , async function ( ) {
6060 const fname = join ( tmpDir , '0001.txt' ) ;
6161
6262 const [ editor , emitter ] = await Promise . all ( [
@@ -71,7 +71,7 @@ suite('WatchFileCommand', function () {
7171 await Promise . all ( [ once ( emitter , 'fileCreated' ) , writeFile ( fname , '' ) ] ) ;
7272 } ) ;
7373
74- test ( 'watchFileCommandHandler - react to file modification' , async function ( ) {
74+ test ( 'react to file modification' , async function ( ) {
7575 const fname = join ( tmpDir , '0002.txt' ) ;
7676
7777 const stream = createWriteStream ( fname ) ;
@@ -96,7 +96,7 @@ suite('WatchFileCommand', function () {
9696 equal ( actual , expectedContent ) ;
9797 } ) ;
9898
99- test ( 'watchFileCommandHandler - react to file removal' , async function ( ) {
99+ test ( 'react to file removal' , async function ( ) {
100100 const fname = join ( tmpDir , '0003.txt' ) ;
101101
102102 await writeFile ( fname , '' ) ;
@@ -117,7 +117,7 @@ suite('WatchFileCommand', function () {
117117 equal ( actual , expected ) ;
118118 } ) ;
119119
120- test ( 'watchFileCommandHandler - preload last 10 lines' , async function ( ) {
120+ test ( 'preload last 10 lines' , async function ( ) {
121121 const fname = join ( tmpDir , '0004.txt' ) ;
122122
123123 const expectedContent = '1\n2\n3\n4\n5\n6\n7\n8\n9\nA\n' ;
@@ -139,8 +139,7 @@ suite('WatchFileCommand', function () {
139139 equal ( actual , expectedContent ) ;
140140 } ) ;
141141
142- test ( 'watchFileCommandHandler - preload entire file if less than 10 lines' , async function ( ) {
143- tmpDir = await mkdtemp ( join ( tmpdir ( ) , 'logwatcher-test-' ) ) ;
142+ test ( 'preload entire file if less than 10 lines' , async function ( ) {
144143 const fname = join ( tmpDir , '0005.txt' ) ;
145144
146145 const expectedContent = '1\n2\n3\n' ;
@@ -162,7 +161,7 @@ suite('WatchFileCommand', function () {
162161 equal ( actual , expectedContent ) ;
163162 } ) ;
164163
165- test ( 'watchFileCommandHandler - reuse existing output channel' , async function ( ) {
164+ test ( 'reuse existing output channel' , async function ( ) {
166165 const filename = __filename ;
167166
168167 await commands . executeCommand ( 'logwatcher.watchFile' , filename ) ;
0 commit comments