Skip to content

Cannot stub Array.prototype.filter #1521

@pomek

Description

@pomek

What did you expect to happen?
The tests should pass.

What actually happens

RangeError: Maximum call stack size exceeded
    at defineProperty (native)
    at Array.proxy (node_modules/sinon/lib/sinon/spy.js:69:79)
    at Function.matchingFakes (node_modules/sinon/lib/sinon/spy.js:343:35)
    at Function.invoke (node_modules/sinon/lib/sinon/spy.js:166:30)
    at Array.proxy (node_modules/sinon/lib/sinon/spy.js:69:54)
    at Function.matchingFakes (node_modules/sinon/lib/sinon/spy.js:343:35)
    at Function.invoke (node_modules/sinon/lib/sinon/spy.js:166:30)
    /* ... */   
    at Array.proxy (node_modules/sinon/lib/sinon/spy.js:69:54)
    at Function.matchingFakes (node_modules/sinon/lib/sinon/spy.js:343:35)
    at Function.invoke (node_modules/sinon/lib/sinon/spy.js:166:30)
    at Array.proxy (node_modules/sinon/lib/sinon/spy.js:69:54)
    at Context.it (packages/ckeditor5-dev-env/tests/asda.js:25:19)

How to reproduce

Just run the tests. It worked in Sinon 1.x and does not work in 2.x and 3.x.

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