()
| 9 | protected abstract tests(): void; |
| 10 | |
| 11 | public runTests(): void { |
| 12 | let beforeEach = this.beforeEach.bind(this); |
| 13 | let resetFrontEndStorage = this.resetFrontEndStorage.bind(this); |
| 14 | |
| 15 | let afterEach = this.afterEach.bind(this); |
| 16 | |
| 17 | // We call the implemented beforeEach/afterEach after the common functionality |
| 18 | // as it's a higher priority, and we don't want to override it |
| 19 | QUnit.module(this.module(), { |
| 20 | beforeEach: () => { |
| 21 | resetFrontEndStorage(); |
| 22 | beforeEach(); |
| 23 | }, |
| 24 | afterEach: () => { |
| 25 | // Unfortunately, we have some code that makes use of static, which |
| 26 | // means that we might end up polluting other test modules if we don't |
| 27 | // reset things. We declare these here so the developer doesn't have |
| 28 | // to remember to do this in their modules. |
| 29 | Settings.setSettingsJsonForTesting(undefined); |
| 30 | Localization.setLocalizedStrings(undefined); |
| 31 | |
| 32 | afterEach(); |
| 33 | } |
| 34 | }); |
| 35 | |
| 36 | this.tests(); |
| 37 | } |
| 38 | |
| 39 | // Overridable |
| 40 | protected beforeEach() { } |
nothing calls this directly
no test coverage detected