diff --git a/packages/pug/test/error.reporting.test.js b/packages/pug/test/error.reporting.test.js index 99ee8e3a4..ddf6d6882 100644 --- a/packages/pug/test/error.reporting.test.js +++ b/packages/pug/test/error.reporting.test.js @@ -209,7 +209,7 @@ describe('error reporting', function() { {} ); expect(err.message).toMatch(/mixin.error.pug:2/); - expect(err.message).toMatch(/Cannot read property 'length' of null/); + expect(err.message).toMatch(/Cannot read (properties of null|property 'length' of null)/); }); }); describe('in a layout', function() { @@ -220,7 +220,7 @@ describe('error reporting', function() { ); expect(err.message).toMatch(/layout.with.runtime.error.pug:3/); expect(err.message).toMatch( - /Cannot read property 'length' of undefined/ + /Cannot read (properties of undefined|property 'length' of undefined)/ ); }); });