Skip to content

Commit

Permalink
✅ Adding unit test for SearchOnInit in false
Browse files Browse the repository at this point in the history
  • Loading branch information
dapize committed Jul 4, 2022
1 parent bf3c456 commit a5dccd9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/config/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,19 @@ describe('Config', () => {
waitFor(() => {
expect(readyCb).toBeCalled();
})
})
});

it('Without Search on Init', () => {
const myDiv = window.document.createElement('div');
myDiv.setAttribute('h', '100');
myDiv.setAttribute('w', '100');
window.document.body.appendChild(myDiv);
lib(window, {
searchOnInit: false,
ready: () => {
expect(myDiv.hasAttribute('h')).toBeTruthy();
expect(myDiv.hasAttribute('w')).toBeTruthy();
}
});
});
});

0 comments on commit a5dccd9

Please sign in to comment.