(command: TestCaseCommand, context: TestCaseContext)
| 42 | } |
| 43 | |
| 44 | async preCommandHook(command: TestCaseCommand, context: TestCaseContext) { |
| 45 | if (this.testCase != null) { |
| 46 | // If testCase is not null and we are just before a command, this means |
| 47 | // that this command is the follow up command indicating which marks we |
| 48 | // cared about from the last command |
| 49 | invariant( |
| 50 | this.testCase.awaitingFinalMarkInfo, |
| 51 | () => "expected to be awaiting final mark info" |
| 52 | ); |
| 53 | this.testCase.filterMarks(command, context); |
| 54 | await this.finishTestCase(); |
| 55 | } else { |
| 56 | // Otherwise, we are starting a new test case |
| 57 | this.testCase = new TestCase(command, context, this.isHatTokenMapTest); |
| 58 | await this.testCase.recordInitialState(); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | async postCommandHook(returnValue: any) { |
| 63 | if (this.testCase == null) { |
no test coverage detected