| 175 | async setup(): Promise<void> {} |
| 176 | |
| 177 | async teardown(): Promise<void> { |
| 178 | if (this.fakeTimers) { |
| 179 | this.fakeTimers.dispose(); |
| 180 | } |
| 181 | if (this.fakeTimersModern) { |
| 182 | this.fakeTimersModern.dispose(); |
| 183 | } |
| 184 | if (this.global != null) { |
| 185 | if (this.errorEventListener) { |
| 186 | this.global.removeEventListener('error', this.errorEventListener); |
| 187 | } |
| 188 | this.global.close(); |
| 189 | } |
| 190 | this.errorEventListener = null; |
| 191 | // @ts-expect-error: this.global not allowed to be `null` |
| 192 | this.global = null; |
| 193 | this.dom = null; |
| 194 | this.fakeTimers = null; |
| 195 | this.fakeTimersModern = null; |
| 196 | } |
| 197 | |
| 198 | exportConditions(): Array<string> { |
| 199 | return this._configuredExportConditions ?? this.customExportConditions; |