test: fix failing tests on 4.x LTS branch (#7661)

This commit is contained in:
Frans Bouwmeester
2021-10-30 19:19:54 +02:00
committed by GitHub
parent 4ac4b7f710
commit 065facdc53
6 changed files with 38 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
// Sets a global variable to the current test spec
// ex: global.currentSpec.description
global.currentSpec = null;
class CurrentSpecReporter {
specStarted(spec) {
global.currentSpec = spec;
}
specDone() {
global.currentSpec = null;
}
}
module.exports = CurrentSpecReporter;