@expressen/tallahassee
Advanced tools
Comparing version 15.4.0 to 15.5.0
@@ -178,4 +178,8 @@ "use strict"; | ||
const tag = $elm[0].name; | ||
const loaded = this[loadedSymbol]; | ||
let mockElement = loaded.find((mockedElm) => mockedElm.$elm[0] === $elm[0]); | ||
let mockElement = loaded.find((mockedElm) => mockedElm?.$elm[0] === $elm[0]); | ||
if (mockElement) { | ||
@@ -188,4 +192,9 @@ return mockElement; | ||
loaded.push(mockElement); | ||
if (this[kElementFactory].isCustom(tag) && mockElement.connectedCallback) { | ||
mockElement.connectedCallback(); | ||
} | ||
return mockElement; | ||
} | ||
}; |
@@ -58,5 +58,3 @@ "use strict"; | ||
if (tagName in custom) { | ||
const elm = new custom[tagName](document, $elm); | ||
if (elm.connectedCallback) elm.connectedCallback(); | ||
return elm; | ||
return new custom[tagName](document, $elm); | ||
} | ||
@@ -74,2 +72,6 @@ | ||
} | ||
isCustom(name) { | ||
return !!this.custom[name]; | ||
} | ||
}; |
{ | ||
"name": "@expressen/tallahassee", | ||
"version": "15.4.0", | ||
"version": "15.5.0", | ||
"description": "Lightweight client testing framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132160
457
4024