Skip to content

Commit

Permalink
More ES6: use super.describe() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsup committed Aug 7, 2018
1 parent af83fa4 commit fd28a30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/types/alternatives/index.js
Expand Up @@ -150,7 +150,7 @@ internals.Alternatives = class extends Any {

describe() {

const description = Any.prototype.describe.call(this);
const description = super.describe();
const alternatives = [];
for (let i = 0; i < this._inner.matches.length; ++i) {
const item = this._inner.matches[i];
Expand Down
2 changes: 1 addition & 1 deletion lib/types/array/index.js
Expand Up @@ -311,7 +311,7 @@ internals.Array = class extends Any {

describe() {

const description = Any.prototype.describe.call(this);
const description = super.describe();

if (this._inner.ordereds.length) {
description.orderedItems = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/types/boolean/index.js
Expand Up @@ -87,7 +87,7 @@ internals.Boolean = class extends Any {

describe() {

const description = Any.prototype.describe.call(this);
const description = super.describe();
description.truthy = [true].concat(this._inner.truthySet.values());
description.falsy = [false].concat(this._inner.falsySet.values());
return description;
Expand Down
2 changes: 1 addition & 1 deletion lib/types/object/index.js
Expand Up @@ -615,7 +615,7 @@ internals.Object = class extends Any {

describe(shallow) {

const description = Any.prototype.describe.call(this);
const description = super.describe();

if (description.rules) {
for (let i = 0; i < description.rules.length; ++i) {
Expand Down

0 comments on commit fd28a30

Please sign in to comment.