( win, opt_implementationClass, opt_elementConnectedCallback )
| 2174 | * @visibleForTesting |
| 2175 | */ |
| 2176 | export function createAmpElementForTesting( |
| 2177 | win, |
| 2178 | opt_implementationClass, |
| 2179 | opt_elementConnectedCallback |
| 2180 | ) { |
| 2181 | const Element = createCustomElementClass( |
| 2182 | win, |
| 2183 | opt_elementConnectedCallback || (() => {}) |
| 2184 | ); |
| 2185 | if (getMode().test && opt_implementationClass) { |
| 2186 | Element.prototype.implementationClassForTesting = opt_implementationClass; |
| 2187 | } |
| 2188 | return Element; |
| 2189 | } |
| 2190 | |
| 2191 | /** |
| 2192 | * @visibleForTesting |
no test coverage detected