Skip to content

Commit c0e7da0

Browse files
committed
test/read-file: passParsingErrors to throws
1 parent 5543cb3 commit c0e7da0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/read-file.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('+ readFile()', function () {
4747
})
4848
})
4949

50-
describe('> when invalid JSON and passParsingErrors set to false', function () {
50+
describe('> when invalid JSON and throws set to false', function () {
5151
it('should return null and no error', function (done) {
5252
var fn = 'somefile4-invalid.json'
5353
var file = path.join(TEST_DIR, fn)
@@ -64,7 +64,7 @@ describe('+ readFile()', function () {
6464
bothDone = true
6565
})
6666

67-
jf.readFile(file, {passParsingErrors: false}, function (err, obj2) {
67+
jf.readFile(file, {throws: false}, function (err, obj2) {
6868
assert.ifError(err)
6969
assert.strictEqual(obj2, null)
7070
if (bothDone) {
@@ -103,7 +103,7 @@ describe('+ readFile()', function () {
103103
})
104104
})
105105

106-
describe('> when invalid JSON and passParsingErrors set to true', function () {
106+
describe('> when invalid JSON and throws set to true', function () {
107107
it('should return an error', function (done) {
108108
var fn = 'somefile4-invalid.json'
109109
var file = path.join(TEST_DIR, fn)
@@ -120,7 +120,7 @@ describe('+ readFile()', function () {
120120
bothDone = true
121121
})
122122

123-
jf.readFile(file, {passParsingErrors: true}, function (err, obj2) {
123+
jf.readFile(file, {throws: true}, function (err, obj2) {
124124
assert(err instanceof Error)
125125
assert(err.message.match(file))
126126
if (bothDone) {

0 commit comments

Comments
 (0)