Skip to content

Commit

Permalink
fix tests on node.js 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed May 30, 2018
1 parent ef4299e commit af6c9d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ describe('validate functions', function() {
});

it('should not fail when file not found', function() {
var filename = Math.random();
var filename = String(Math.random());
var errors = fn.validateFile(filename);

assert.deepEqual(Object.keys(errors), [filename]);
assert.equal(errors[filename].length, 1);
assert.equal(errors[filename][0].name, 'TypeError');
assert.equal(errors[filename][0].name, 'Error');
});
});

Expand Down Expand Up @@ -88,12 +88,12 @@ describe('validate functions', function() {
});

it('should not fail when path is invalid', function() {
var path = Math.random();
var path = String(Math.random());
var errors = fn.validatePath(path);

assert.deepEqual(Object.keys(errors), [path]);
assert.equal(errors[path].length, 1);
assert.equal(errors[path][0].name, 'TypeError');
assert.equal(errors[path][0].name, 'Error');
});
});

Expand Down

0 comments on commit af6c9d1

Please sign in to comment.