jest-stub-super-constructor
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Actions Status Actions Status Actions Status Test Coverage Maintainability Packages npm version

Easily stub the super call from a constructor using jest

Usage

Just use it passing the class you want to stub the super on the constructor, like this:

  const superStub = stubSuperConstructor(MyClass);

And use the superStub the way you're used to, as with any other spy.

License

Licensed under MIT.

/jest-stub-super-constructor/

    Package Sidebar

    Install

    npm i jest-stub-super-constructor

    Weekly Downloads

    2

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    7.9 kB

    Total Files

    7

    Last publish

    Collaborators

    • pedrosodre
    • danielcarvalho
    • gustavobeavis
    • paulododt
    • fgabrielsilva
    • danielgaleni
    • farenheith
    • jeocoutinho