Skip to content

Not compatible with chai v4 #12

@nunof07

Description

@nunof07

This code:

import chai = require("chai");
import { expect } from 'chai';
import chaiIterator = require("chai-iterator");

chai.use(chaiIterator);

expect([2, 3, 5]).to.iterate.for.lengthOf(3);

Throws the following error.

AssertionError: expected undefined to be iterable

Here is a repo with reproduction: https://github.com/nunof07/chai-iterator-test

Can't quite figure out is going wrong. _obj is undefined in Assertion.addProperty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions