Skip to content

export spy function as names export from chai-spies #106

@Fuzzyma

Description

@Fuzzyma

Atm one as to register the spies before beeing able to use it with the chai-object chai.spy

However, I like to import only what I need:

import {expect, use} from 'chai'
import spies from 'chai-spies'

use(spies)

As you can see I cannot grab the spy function because its not available at import time.
Thats why it would be cool to have a named export on chai-spies which returns a wrapper to the chai.spy. That way you can do:

import {expect, use} from 'chai'
import spies, {spy} from 'chai-spies'

use(spies)

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions