1+ /* eslint-disable no-console */
12import { lstatSync , readdirSync } from 'node:fs'
23import { readFile } from 'node:fs/promises'
34import { join , sep } from 'node:path'
@@ -11,6 +12,8 @@ import {
1112 prettifyBrackets ,
1213} from './utils'
1314
15+ const SHOULD_LOG = false
16+
1417/**
1518 * `tests/samples` contains code snippets that annotate expected colors with `@colors` comments.
1619 * `Y`, `P`, `B` are for the 3 levels of matched brackets (yellow, purple, blue), and `R` is for mismatched brackets (red).
@@ -63,11 +66,11 @@ describe('file-driven tests', async () => {
6366 } )
6467 const actualBrackets = parseActualBrackets ( html )
6568 // Logging the colored brackets is much easier to read
66- /* eslint-disable no-console */
67- console . log ( c . bold ( fileName ) )
68- console . log ( ' Expected:' , prettifyBrackets ( expectedBrackets ) )
69- console . log ( ' Actual: ' , prettifyBrackets ( actualBrackets ) )
70- /* eslint-enable no-console */
69+ if ( SHOULD_LOG ) {
70+ console . log ( c . bold ( fileName ) )
71+ console . log ( ' Expected:' , prettifyBrackets ( expectedBrackets ) )
72+ console . log ( ' Actual: ' , prettifyBrackets ( actualBrackets ) )
73+ }
7174 expect ( prettifyBrackets ( actualBrackets , { noAnsi : true } ) ) . toEqual (
7275 prettifyBrackets ( expectedBrackets , { noAnsi : true } ) ,
7376 )
0 commit comments