bun icon indicating copy to clipboard operation
bun copied to clipboard

"Attempted to assign to readonly property" error with `power-assert` package

Open DetachHead opened this issue 3 years ago • 0 comments

Version

0.1.5

Platform

Microsoft Windows NT 10.0.19044.0 x64

What steps will reproduce the bug?

const assert = require('power-assert')

assert(true)

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

no error

What do you see instead?

$ bun run asdf.ts
32 |     switch (typeOfAssert) {
33 |     case 'function':
34 |         enhancedAssert = empowerAssertFunction(assert, options);
35 |         break;
36 |     case 'object':
37 |         enhancedAssert = empowerAssertObject(assert, options);
                             ^
TypeError: Attempted to assign to readonly property.
      at empowerCore (/project/node_modules/empower-core/index.js:37:25)
      at empower (/project/node_modules/empower/index.js:83:25)
      at customize (/project/node_modules/power-assert/index.js:47:24)
      at /project/node_modules/power-assert/index.js:64:20
      at bun:wrap:1:16354
      at /project/asdf.ts:1:23

Additional information

No response

DetachHead avatar Jul 31 '22 12:07 DetachHead