Skip to content

Commit c3eee6c

Browse files
authored
fix scope of exp (#129)
avoid accidental side-effects of a previously defined exp
1 parent b271f84 commit c3eee6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json-to-go.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function test(includeExampleData) {
142142
if (got.error) {
143143
console.assert(!got.error, `format('${testCase.input}'): ${got.error}`);
144144
} else {
145-
exp = includeExampleData ? testCase.expectedWithExample : testCase.expected
145+
const exp = includeExampleData ? testCase.expectedWithExample : testCase.expected
146146
console.assert(
147147
got.go === exp,
148148
`format('${testCase.input}'): \n\tgot: ${quote(got.go)}\n\twant: ${quote(exp)}`

0 commit comments

Comments
 (0)