Skip to content

[v5] assert.isFunction() fails with async function #1564

Closed
@ReDemoNBR

Description

@ReDemoNBR

The function assert.isFunction is failing on AsyncFunction on v5.0.0, while on v4.3.10 it was working

A simple scenario is the one below:

describe("Scenario", ()=>{
    it("Should be a function", ()=>{
        async function foo() {
            console.log("Hello World");
        }
        assert.isFunction(foo); // fails on v5.0.0
    });
});

For now I changed my tests to use the JS builtin typeof, like:

assert.strictEqual(typeof foo, "function");`

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