Skip to content

Commit ab7434a

Browse files
author
Olof Dahlbom
committed
Add variable
1 parent 4c6ffae commit ab7434a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/test/enhanced-debugging.ts

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ const createTableForMocks = (matches: MockMatchResult[]) => {
6767
]
6868

6969
const getColumnValuesFromMatch = ({ match, mockValue, requestValue }: ColumnValue) => {
70-
console.log(mockValue, requestValue)
7170
const value = mockValue !== requestValue ? diffString(requestValue, mockValue) : mockValue
7271
return [
7372
match ? colors.green('Yes') : colors.red('No'),

src/test/index.spec.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const stripAnsi = (str) => {
1212
return str.replace(ansiRegex, '')
1313
}
1414

15-
const expectToThrowErrorMatchingSnapshotWithoutAnsi = (fn, logToConsole) => {
15+
const LOG_TO_CONSOLE = false
16+
17+
const expectToThrowErrorMatchingSnapshotWithoutAnsi = (fn, logToConsole = LOG_TO_CONSOLE) => {
1618
try {
1719
fn()
1820
throw new Error('Expected function to throw an error, but it did not.')
@@ -224,6 +226,6 @@ describe('mappersmith/test/lookupResponse', () => {
224226
}
225227
)
226228

227-
expectToThrowErrorMatchingSnapshotWithoutAnsi(() => lookupResponse(request))
229+
expectToThrowErrorMatchingSnapshotWithoutAnsi(() => lookupResponse(request), true)
228230
})
229231
})

0 commit comments

Comments
 (0)