Skip to content

Commit

Permalink
Tests: Test for [IS_LAZY] default value
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Oct 3, 2020
1 parent 150e229 commit 30baae8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ describe('Init', () => {
});

describe('determines `[IS_LAZY]`', () => {
it('true as default if `[IS_LAZY]` undefined and `[GET_IS_LAZY]()` returns undefined', async () => {
const route = new ReactRoute();
route[REACT_ROOT] = route;
route[GET_IS_LAZY] = () => undefined;
await route.init();
expect(route[IS_LAZY]).toBe(true);
});

it('from `[GET_IS_LAZY]()` if `[IS_LAZY]` undefined', async () => {
const route = new ReactRoute();
route[REACT_ROOT] = route;
Expand Down

0 comments on commit 30baae8

Please sign in to comment.