test: fix failing tests on 4.x LTS branch (#7661)
This commit is contained in:
committed by
GitHub
parent
4ac4b7f710
commit
065facdc53
15
spec/support/CurrentSpecReporter.js
Normal file
15
spec/support/CurrentSpecReporter.js
Normal 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;
|
||||
Reference in New Issue
Block a user