Blob Blame History Raw
commit 14ed45c8a803a193d527bc8d6fed70f5ca6d6cbc
Author: Tom Hughes <tom@compton.nu>
Date:   Fri Dec 23 15:01:58 2016 +0000

    Fix invalid json test for changes in Node.js
    
    In recent versions of Node.js the error message is now:
    
    SyntaxError: Unexpected token ] in JSON at position 190
    
    instead of:
    
    SyntaxError: Unexpected token ]

diff --git a/test/error.test.js b/test/error.test.js
index 8fba15f..531bc69 100644
--- a/test/error.test.js
+++ b/test/error.test.js
@@ -25,7 +25,7 @@ it('correctly handles invalid json', function(done) {
     };
 
     millstone.resolve(options, function(err, resolved) {
-        assert.ok(err.message.search("error: 'Unexpected token ]'") != -1);
+        assert.ok(err.message.search("error: 'Unexpected token \\][' ]") != -1);
         done();
     });
 });
@@ -61,4 +61,4 @@ it('correctly handles missing shapefile at absolute path', function(done) {
         assert.ok(err_expected);
         done();
     });
-});
\ No newline at end of file
+});