Skip to content

Commit

Permalink
test: add test for shown message
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Nov 9, 2022
1 parent 2d56711 commit b5bed16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/tests/unit/dom/data.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})

Expand All @@ -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 */
Expand Down

0 comments on commit b5bed16

Please sign in to comment.