Skip to content

Error in strict mode #47

@ck97756

Description

@ck97756

env: chrome 114

Uncaught TypeError: Cannot assign to read only property 'length' of function 'function(arg, msg) {
          if (!arg) {
            _toss(msg, "true", arg);
          }
        }'
    at assert.js:202:14
    at Array.forEach (<anonymous>)
    at _setExports (assert.js:193:25)
    at node_modules/assert-plus/assert.js (assert.js:211:18)

This happens when try to change read only property 'length' or 'name' at

/* re-export built-in assertions */
    Object.keys(assert).forEach(function (k) {
        if (k === 'AssertionError') {
            out[k] = assert[k];
            return;
        }
        if (ndebug) {
            out[k] = noop;
            return;
        }
        out[k] = assert[k];
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions