Skip to content

Commit

Permalink
fix: compat with Node.js readonly error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlewind committed Jan 19, 2021
1 parent 84ec8b7 commit c7e1764
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion __test__/image.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ test('properties should be readonly', (t) => {
const image = new Image()
const expectation = {
instanceOf: TypeError,
message: /Cannot set property (.)* of #<Image> which has only a getter/,
// compat with different Node.js versions
message: /(Cannot assign to read only property)|(Cannot set property)/,
}

// @ts-expect-error
Expand Down

0 comments on commit c7e1764

Please sign in to comment.