Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Typed Arrays not truncated #441

@jwagner

Description

@jwagner

Chai does currently not handle typed arrays very well:
http://jsfiddle.net/7LbaveL6/

Typed Arrays have various uses but are usually big blobs of data (for example from canvas getImageData).

The problem with the way they are currently handled is that it causes the page to freeze when assertions are run on objects containing bigger typed arrays.

I looked at the code but wasn't sure where the right place for a fix would be.

In my opinion it would be ok to just output the to String representation of the typed array (by treating it like a primitive), but it could also use the array code path with proper truncation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions