Skip to content

Commit 56a3687

Browse files
committed
test: fix win tests
1 parent 7601ec1 commit 56a3687

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/read-file-sync.test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,15 @@ describe('+ readFileSync()', function () {
3636

3737
describe('> when invalid JSON', function () {
3838
it('should include the filename in the error', function () {
39-
var file = path.join(TEST_DIR, 'somefile.json')
39+
var fn = 'somefile.json'
40+
var file = path.join(TEST_DIR, fn)
4041
fs.writeFileSync(file, '{')
4142

4243
assert.throws(function () {
4344
jf.readFileSync(file)
4445
}, function (err) {
4546
assert(err instanceof Error)
46-
console.log(file)
47-
console.log(err.message)
48-
assert(err.message.match(file))
47+
assert(err.message.match(fn))
4948
return true
5049
})
5150
})

test/read-file.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ describe('+ readFile()', function () {
3535

3636
describe('> when invalid JSON', function () {
3737
it('should include the filename in the error', function (done) {
38-
var file = path.join(TEST_DIR, 'somefile.json')
38+
var fn = 'somefile.json'
39+
var file = path.join(TEST_DIR, fn)
3940
fs.writeFileSync(file, '{')
4041

4142
jf.readFile(file, function (err, obj2) {
4243
assert(err instanceof Error)
43-
assert(err.message.match(file))
44+
assert(err.message.match(fn))
4445
done()
4546
})
4647
})

0 commit comments

Comments
 (0)