mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +00:00
c8ce9608c0
Bug: T255447 Change-Id: I4cdde3070a6dc4e742ea37a78a17dfd556103dd6
25 lines
730 B
JavaScript
25 lines
730 B
JavaScript
/**
|
|
* Hooks
|
|
*
|
|
* Hooks are used for setup and teardown of the environment before and after each scenario.
|
|
* It's preferable to use tags to invoke hooks rather than using the generic 'Before' and 'After'
|
|
* events, which execute before and after all scenario.
|
|
* https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/hooks.md
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const { After, Before } = require( 'cucumber' ); // eslint-disable-line node/no-missing-require
|
|
|
|
Before( function () {
|
|
// This hook will be executed before ALL scenarios
|
|
} );
|
|
|
|
After( function () {
|
|
// This hook will be executed after ALL scenarios
|
|
} );
|
|
|
|
Before( { tags: '@foo' }, function () {
|
|
// This hook will be executed before scenarios tagged with @foo
|
|
} );
|