Lines Matching refs:parent

211     let { fn, name, parent, skip } = options;
222 if (!(parent instanceof Test)) {
223 parent = null;
226 if (parent === null) {
243 const nesting = parent.parent === null ? parent.nesting :
244 parent.nesting + 1;
246 this.concurrency = parent.concurrency;
248 this.only = only ?? !parent.runOnlySubtests;
249 this.reporter = parent.reporter;
251 this.testNumber = parent.subtests.length + 1;
252 this.timeout = parent.timeout;
253 this.root = parent.root;
258 beforeEach: ArrayPrototypeSlice(parent.hooks.beforeEach),
259 afterEach: ArrayPrototypeSlice(parent.hooks.afterEach),
271 this.concurrency = parent === null ?
289 this.parent = parent;
358 this.parent?.matchesTestNamePatterns();
407 if (i === 1 && this.parent !== null) {
431 let parent = this;
437 while (parent.parent !== null) {
438 parent = parent.parent;
442 const test = new Factory({ __proto__: null, fn, name, parent, ...options, ...overrides });
444 if (parent.waitingOn === 0) {
445 parent.waitingOn = test.testNumber;
452 'test could not be started because its parent finished',
458 ArrayPrototypePush(parent.subtests, test);
475 'test did not finish before its parent and was cancelled',
533 if (!this.parent.hasConcurrency()) {
537 this.parent.addPendingSubtest(deferred);
578 if (this.parent !== null) {
579 this.parent.activeSubtests++;
595 if (this.parent?.hooks.afterEach.length > 0) {
596 await this.parent.runHook('afterEach', { __proto__: null, args, ctx });
603 if (this.parent?.hooks.before.length > 0) {
604 await this.parent.runHook('before', this.parent.getRunArgs());
606 if (this.parent?.hooks.beforeEach.length > 0) {
607 await this.parent.runHook('beforeEach', { __proto__: null, args, ctx });
660 if (this.parent !== null) {
665 if (this.parent !== null || typeof this.hookType === 'string') {
701 if ((this.passed || this.parent === null) && failed > 0) {
711 if (this.parent !== null) {
712 this.parent.activeSubtests--;
713 this.parent.addReadySubtest(this);
714 this.parent.processReadySubtestRange(false);
715 this.parent.processPendingSubtests();
717 if (this.parent === this.root &&
764 return this.parent === null ||
766 this.parent.waitingOn === this.testNumber && this.parent.isClearToSend()
781 // Output this test's results and update the parent's waiting counter.
783 this.parent.waitingOn++;
825 if (this.#reportedSubtest || this.parent === null) {
829 this.parent.reportStarted();
843 this.parentTest = options.parent ?? null;
865 const { error, loc, parentTest: parent } = this;
868 if (error && parent !== null &&
869 parent === parent.root && this.hookType === 'after') {
875 parent.reporter.fail(0, loc, parent.subtests.length + 1, loc.file, {
928 this.parent.activeSubtests++;
938 if (this.parent.hooks.before.length > 0) {
939 await this.parent.runHook('before', this.parent.getRunArgs());