Skip to content

Adapt tests to support V8 9.3 #4282

@targos

Description

@targos

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: v16.9.0
  • module version: 20.1.5
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): CITGM
  • any other relevant information:

What problem are you trying to solve?

Run tests with Node.js 16.9.0 (nodejs/node#40011).

Two of them fail because V8 changed the error message when trying to read properties from null or undefined.

   103) Core _debug() outputs 500 on ext exception:
       actual expected
       "Cannot read propertiesproperty 'here' of null (reading 'here')"
       Expected "Cannot read properties of null (reading 'here')" to equal specified value: "Cannot read property 'here' of null"
       at /home/iojs/tmp/citgm_tmp/08e39eff-f7ef-4ead-92fa-cc5d18384c97/@hapi/hapi/test/core.js:338:44
   231) handler execute() returns 500 on handler exception (next tick await):
       actual expected
       "Cannot read propertiesproperty 'here' of null (reading 'here')"
       Expected "Cannot read properties of null (reading 'here')" to equal specified value: "Cannot read property 'here' of null"
       at /home/iojs/tmp/citgm_tmp/08e39eff-f7ef-4ead-92fa-cc5d18384c97/@hapi/hapi/test/handler.js:76:44

https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2754/nodes=fedora-latest-x64/testReport/junit/(root)/citgm/_hapi_hapi_v20_1_5/

Do you have a new or modified API suggestion to solve the problem?

Adapt the following assertions to support the new error message:

console.error = function (...args) {

expect(event.error.message).to.equal('Cannot read property \'here\' of null');

Metadata

Metadata

Assignees

Labels

testTest or coverage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions