Skip to content

Commit 1bb9ae6

Browse files
authored
chore: coverage (bootstrap-vue#1458)
* Update tooltip.class.js * Update popover.class.js * Update observe-dom.js
1 parent 9c6c9b2 commit 1bb9ae6

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/utils/observe-dom.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ export default function observeDOM (el, callback, opts) {
1414

1515
// Handle case where we might be passed a vue instance
1616
el = el ? (el.$el || el) : null
17+
/* istanbul ignore next: dificult to test in JSDOM */
1718
if (!isElement(el)) {
1819
// We can't observe somthing that isn't an element
1920
return null
2021
}
2122

2223
let obs = null
2324

25+
/* istanbul ignore next: dificult to test in JSDOM */
2426
if (MutationObserver) {
2527
// Define a new observer
26-
/* istanbul ignore next: dificult to test */
2728
obs = new MutationObserver(mutations => {
2829
let changed = false
2930
// A Mutation can contain several change records, so we loop through them to see what has changed.

src/utils/popover.class.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const Selector = {
2626
CONTENT: '.popover-body'
2727
}
2828

29+
/* istanbul ignore next: dificult to test in Jest/JSDOM environment */
2930
class PopOver extends ToolTip {
3031
// Getter overrides
3132

src/utils/tooltip.class.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ const TransitionEndEvents = {
102102
// Could use Alex's uid generator util
103103
// Each tooltip requires a unique client side ID
104104
let NEXTID = 1
105+
/* istanbul ignore next */
105106
function generateId (name) {
106107
return `__BV_${name}_${NEXTID++}__`
107108
}
108109

109110
/*
110111
* ToolTip Class definition
111112
*/
113+
/* istanbul ignore next: difficult to test in Jest/JSDOM environment */
112114
class ToolTip {
113115
// Main constructor
114116
constructor (element, config, $root) {

0 commit comments

Comments
 (0)