(runner)
| 13 | */ |
| 14 | export class TestConfig { |
| 15 | constructor(runner) { |
| 16 | this.runner = runner; |
| 17 | |
| 18 | /** |
| 19 | * List of predicate functions that are called before running each test |
| 20 | * suite to check whether the suite should be skipped or not. |
| 21 | * If any of the functions return 'true', the suite will be skipped. |
| 22 | * @type {!Array<function():boolean>} |
| 23 | */ |
| 24 | this.skipMatchers = []; |
| 25 | |
| 26 | /** |
| 27 | * List of predicate functions that are called before running each test |
| 28 | * suite to check whether the suite should be skipped or not. |
| 29 | * If any of the functions return 'false', the suite will be skipped. |
| 30 | * @type {!Array<function():boolean>} |
| 31 | */ |
| 32 | this.ifMatchers = []; |
| 33 | |
| 34 | this.platform = Services.platformFor(window); |
| 35 | |
| 36 | this.isModuleBuild = () => !!window.ampTestRuntimeConfig.isModuleBuild; |
| 37 | |
| 38 | /** |
| 39 | * Predicate functions that determine whether to run tests on a platform. |
| 40 | */ |
| 41 | this.runOnChrome = this.platform.isChrome.bind(this.platform); |
| 42 | this.runOnEdge = this.platform.isEdge.bind(this.platform); |
| 43 | this.runOnFirefox = this.platform.isFirefox.bind(this.platform); |
| 44 | this.runOnSafari = this.platform.isSafari.bind(this.platform); |
| 45 | this.runOnIos = this.platform.isIos.bind(this.platform); |
| 46 | } |
| 47 | |
| 48 | skipModuleBuild() { |
| 49 | return this.skip(this.isModuleBuild); |
nothing calls this directly
no outgoing calls
no test coverage detected