Lines Matching defs:before
74 const kHookNames = ObjectSeal(['before', 'after', 'beforeEach', 'afterEach']);
163 // eslint-disable-next-line no-use-before-define
170 before(fn, options) {
171 this.#test.createHook('before', fn, options);
237 before: [],
256 before: [],
475 'test did not finish before its parent and was cancelled',
479 this.startTime = this.startTime || this.endTime; // If a test was canceled before it was started, e.g inside a hook
486 // eslint-disable-next-line no-use-before-define
488 if (name === 'before' || name === 'after') {
603 if (this.parent?.hooks.before.length > 0) {
604 await this.parent.runHook('before', this.parent.getRunArgs());
678 // If the test was failed before it even started, then the end time will
740 // Call this harness.coverage() before collecting diagnostics, since failure to collect coverage is a diagnostic.
938 if (this.parent.hooks.before.length > 0) {
939 await this.parent.runHook('before', this.parent.getRunArgs());
942 await this.runHook('before', hookArgs);