Skip to content

Commit

Permalink
[Tests]: add tests for directly mount Suspense
Browse files Browse the repository at this point in the history
  • Loading branch information
chenesan committed Jan 21, 2019
1 parent 40ed6ed commit 8a1dde1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Expand Up @@ -599,6 +599,11 @@ describeWithDOM('mount', () => {
expect(wrapper.find(Fallback)).to.have.lengthOf(0);
});

it('can mount Suspense directly', () => {
const wrapper = mount(<Suspense fallback={Fallback} />);
expect(wrapper.is(Suspense)).to.equal(true);
});

it('finds fallback when given lazy component in initial mount', () => {
const LazyComponent = lazy(() => fakeDynamicImport(DynamicComponent));
const SuspenseComponent = () => (
Expand Down

0 comments on commit 8a1dde1

Please sign in to comment.