From af6c9d18689ea7219e5aa00b1bb1df9bf89ddfc1 Mon Sep 17 00:00:00 2001 From: Roman Dvornov Date: Wed, 30 May 2018 15:27:44 +0300 Subject: [PATCH] fix tests on node.js 9+ --- test/validate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/validate.js b/test/validate.js index aa9ab33..e64e705 100644 --- a/test/validate.js +++ b/test/validate.js @@ -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'); }); }); @@ -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'); }); });