From b5bed16fdf8198d492c352849abf247bbe0d267f Mon Sep 17 00:00:00 2001 From: George Sotiropoulos Date: Tue, 8 Nov 2022 10:32:11 +0200 Subject: [PATCH] test: add test for shown message --- js/tests/unit/dom/data.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/tests/unit/dom/data.spec.js b/js/tests/unit/dom/data.spec.js index b8c7b0ad9a2c..6cef9c59500e 100644 --- a/js/tests/unit/dom/data.spec.js +++ b/js/tests/unit/dom/data.spec.js @@ -87,7 +87,7 @@ describe('Data', () => { Data.set(div, TEST_KEY, data) Data.set(div, UNKNOWN_KEY, copy) - expect(console.error).toHaveBeenCalled() + expect(console.error).toHaveBeenCalledWith(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${TEST_KEY}.`) expect(Data.get(div, UNKNOWN_KEY)).toBeNull() }) @@ -99,7 +99,7 @@ describe('Data', () => { Data.set(div, TEST_KEY, data) Data.set(div, TEST_KEY, data) - expect(console.error).toHaveBeenCalled() + expect(console.error).toHaveBeenCalledWith(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${TEST_KEY}.`) expect(Data.get(div, TEST_KEY)).toEqual(data) }) /* eslint-enable no-console */