From a5dccd99670a077174766ef6bf97d18dd9cf863b Mon Sep 17 00:00:00 2001 From: Daniel P Z Date: Mon, 4 Jul 2022 11:03:26 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Adding=20unit=20test=20for=20Search?= =?UTF-8?q?OnInit=20in=20false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/config/main.test.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/config/main.test.ts b/test/config/main.test.ts index 62d9501..a23fd44 100644 --- a/test/config/main.test.ts +++ b/test/config/main.test.ts @@ -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(); + } + }); + }); });