Skip to content

Commit 34e0e52

Browse files
authored
docs: fix examples for linkPartialObjects methods (#5255)
1 parent d3b2c38 commit 34e0e52

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/nodejs/parallel-buffered-runner.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,16 @@ class ParallelBufferedRunner extends Runner {
374374
* // this reporter needs proper object references when run in parallel mode
375375
* class MyReporter() {
376376
* constructor(runner) {
377-
* this.runner.linkPartialObjects(true)
377+
* runner.linkPartialObjects(true)
378378
* .on(EVENT_SUITE_BEGIN, suite => {
379-
// this Suite may be the same object...
380-
* })
381-
* .on(EVENT_TEST_BEGIN, test => {
382-
* // ...as the `test.parent` property
383-
* });
384-
* }
385-
* }
386-
*/
379+
* // this Suite may be the same object...
380+
* })
381+
* .on(EVENT_TEST_BEGIN, test => {
382+
* // ...as the `test.parent` property
383+
* });
384+
* }
385+
* }
386+
*/
387387
linkPartialObjects(value) {
388388
this._linkPartialObjects = Boolean(value);
389389
return super.linkPartialObjects(value);

lib/runner.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,11 +1116,11 @@ Runner.prototype.run = function (fn, opts = {}) {
11161116
* @public
11171117
* @example
11181118
* // this reporter needs proper object references when run in parallel mode
1119-
* class MyReporter() {
1119+
* class MyReporter {
11201120
* constructor(runner) {
1121-
* this.runner.linkPartialObjects(true)
1121+
* runner.linkPartialObjects(true)
11221122
* .on(EVENT_SUITE_BEGIN, suite => {
1123-
// this Suite may be the same object...
1123+
* // this Suite may be the same object...
11241124
* })
11251125
* .on(EVENT_TEST_BEGIN, test => {
11261126
* // ...as the `test.parent` property

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy