From 0208be18fdb462ea91786d6293257559d41fd6e0 Mon Sep 17 00:00:00 2001 From: Adrien Denat Date: Thu, 19 Jan 2023 12:57:16 +0000 Subject: [PATCH] chore(core): update tests after changes --- .../simplebar-core/tests/simplebar.test.ts | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/simplebar-core/tests/simplebar.test.ts b/packages/simplebar-core/tests/simplebar.test.ts index be3cd9eb..cd677ac3 100755 --- a/packages/simplebar-core/tests/simplebar.test.ts +++ b/packages/simplebar-core/tests/simplebar.test.ts @@ -1,11 +1,30 @@ import SimpleBar from '../src'; +const template = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`; + beforeEach(() => { jest.resetModules(); // Set up our document body - document.body.innerHTML = - '
'; + document.body.innerHTML = `
${template}
`; }); test('should call constructor', () => { @@ -120,8 +139,7 @@ describe('nested SimpleBars with initiated DOM', () => { beforeEach(() => { // Set up our document body - document.body.innerHTML = - '
'; + document.body.innerHTML = `
${template}
${template}
`; parent = new SimpleBar( document.getElementById('simplebar-parent') as HTMLElement