Skip to content

Commit 5752970

Browse files
bmeckisaacs
authored andcommitted
use setPrototypeOf instead of __proto__
PR-URL: #68 Credit: @bmeck Close: #68 Reviewed-by: @isaacs
1 parent 9c07e0e commit 5752970

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

lib/reporters/dot.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ function Dot(runner) {
5959
* Inherit from `Base.prototype`.
6060
*/
6161

62-
Dot.prototype.__proto__ = Base.prototype;
62+
Object.setPrototypeOf(Dot.prototype, Base.prototype);

lib/reporters/landing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ function Landing(runner) {
9393
* Inherit from `Base.prototype`.
9494
*/
9595

96-
Landing.prototype.__proto__ = Base.prototype;
96+
Object.setPrototypeOf(Landing.prototype, Base.prototype);

lib/reporters/list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ function List(runner) {
6060
* Inherit from `Base.prototype`.
6161
*/
6262

63-
List.prototype.__proto__ = Base.prototype;
63+
Object.setPrototypeOf(List.prototype, Base.prototype);

lib/reporters/min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ function Min(runner) {
3434
* Inherit from `Base.prototype`.
3535
*/
3636

37-
Min.prototype.__proto__ = Base.prototype;
37+
Object.setPrototypeOf(Min.prototype, Base.prototype);

lib/reporters/nyan.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,4 @@ function write(string) {
257257
* Inherit from `Base.prototype`.
258258
*/
259259

260-
NyanCat.prototype.__proto__ = Base.prototype;
260+
Object.setPrototypeOf(NyanCat.prototype, Base.prototype);

lib/reporters/progress.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ function Progress(runner, options) {
8989
* Inherit from `Base.prototype`.
9090
*/
9191

92-
Progress.prototype.__proto__ = Base.prototype;
92+
Object.setPrototypeOf(Progress.prototype, Base.prototype);

lib/reporters/spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ function Spec(runner) {
7979
* Inherit from `Base.prototype`.
8080
*/
8181

82-
Spec.prototype.__proto__ = Base.prototype;
82+
Object.setPrototypeOf(Spec.prototype, Base.prototype);

lib/reporters/xunit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ XUnit.prototype.done = function(failures, fn) {
8888
* Inherit from `Base.prototype`.
8989
*/
9090

91-
XUnit.prototype.__proto__ = Base.prototype;
91+
Object.setPrototypeOf(XUnit.prototype, Base.prototype);
9292

9393
/**
9494
* Write out the given line

0 commit comments

Comments
 (0)