How to use the expect.default function in expect

To help you get started, we’ve selected a few expect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tomchentw-deprecated / redux-component / src / components / __tests__ / Componentize.spec.js View on Github external
it(`will clean up Component after unmount`, function it() {
        const ReduxComponent = Componentize(createStore, () =&gt; ({}), noop, noop)(() =&gt; (<div>));

        const div = document.createElement(`div`);

        const comp = ReactDOM.render(
          
        , div);

        ReactDOM.unmountComponentAtNode(div);

        expect(comp.unsubscribeFromStore).toNotExist();
        expect(comp.eventActions).toNotExist();
        expect(comp.lifecycleActions).toNotExist();
        expect(comp.store).toNotExist();
      });
    });</div>
github tomchentw / react-google-maps / src / __tests__ / GoogleMap.spec.js View on Github external
it(`should warn and throw error`, () =&gt; {
        const warningSpy = expect.spyOn(console, `error`);
        expect(warningSpy).toNotHaveBeenCalled();

        let error;
        try {
          render((
            
          ), document.createElement(`div`));
        } catch (__e__) {
          error = __e__;
        }
        expect(error).toExist();
        expect(warningSpy).toHaveBeenCalled();

        warningSpy.restore();
      });
    });
github tomchentw-deprecated / redux-component / src / components / __tests__ / ReduxComponentMixin.spec.js View on Github external
it(`returns a mixin object`, function it() {
      const mixin = ReduxComponentMixin(() => ({}));

      expect(mixin.getInitialState).toBeA(`function`, `and have getInitialState function`);
      expect(mixin.componentWillUnmount).toBeA(
        `function`, `and have componentWillUnmount function`
      );
    });
github tomchentw-deprecated / redux-component / src / components / __tests__ / Componentize.spec.js View on Github external
it(`should contain React.Component lifecycle functions`, function it() {
        const ReduxComponent = Componentize(createStore, () => ({}), noop, noop)();
        const comp = new ReduxComponent();

        expect(comp.componentWillMount).toBeA(`function`);
        expect(comp.componentDidMount).toBeA(`function`);
        expect(comp.componentWillReceiveProps).toBeA(`function`);
        expect(comp.componentWillUpdate).toBeA(`function`);
        expect(comp.componentDidUpdate).toBeA(`function`);
        expect(comp.componentWillUnmount).toBeA(`function`);
      });
github bentatum / better-react-spinkit / src / WanderingCubes / __spec__ / index.spec.js View on Github external
it('renders a container', () => {
    expect(tree.type).toEqual(Base)
  })
})
github bentatum / better-react-spinkit / src / ChasingDots / __spec__ / index.spec.js View on Github external
it('renders a container', () => {
    expect(tree.type).toEqual(Base)
  })
github bentatum / better-react-spinkit / src / RotatingPlane / __spec__ / index.spec.js View on Github external
it('renders a container', () => {
    expect(tree.type).toEqual(Base)
  })
})
github bentatum / better-react-spinkit / src / Pulse / __spec__ / index.spec.js View on Github external
it('renders a container', () => {
    expect(tree.type).toEqual(Base)
  })
})
github bentatum / better-react-spinkit / src / FoldingCube / __spec__ / index.spec.js View on Github external
it('renders a container', () => {
    expect(tree.type).toEqual(Base)
  })
})
github bentatum / better-react-spinkit / src / ThreeBounce / __spec__ / index.spec.js View on Github external
it('renders a container', () => {
    expect(tree.type).toEqual(Base)
  })
})

expect

This package exports the `expect` function used in [Jest](https://jestjs.io/). You can find its documentation [on Jest's website](https://jestjs.io/docs/expect).

MIT
Latest version published 1 year ago

Package Health Score

88 / 100
Full package analysis