Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Prettier everything
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Sep 3, 2017
1 parent 999b122 commit 90bf91e
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 123 deletions.
5 changes: 4 additions & 1 deletion lib/assertion-error.js
Expand Up @@ -63,7 +63,10 @@ function prependIndent(line) {
}

function indentLines(text) {
return text.split("\n").map(prependIndent).join("\n");
return text
.split("\n")
.map(prependIndent)
.join("\n");
}

// assert.AssertionError instanceof Error
Expand Down
4 changes: 3 additions & 1 deletion lib/ext/match.js
Expand Up @@ -129,7 +129,9 @@ export default function(should, Assertion) {
other,
function(value, key) {
try {
should(this.obj).have.property(key).which.match(value);
should(this.obj)
.have.property(key)
.which.match(value);
matchedProps.push(formatProp(key));
} catch (e) {
if (e instanceof should.AssertionError) {
Expand Down
5 changes: 4 additions & 1 deletion lib/ext/number.js
Expand Up @@ -36,7 +36,10 @@ export default function(should, Assertion) {
Assertion.add("Infinity", function() {
this.params = { operator: "to be Infinity" };

this.is.a.Number().and.not.a.NaN().and.assert(!isFinite(this.obj));
this.is.a
.Number()
.and.not.a.NaN()
.and.assert(!isFinite(this.obj));
});

/**
Expand Down
4 changes: 3 additions & 1 deletion lib/ext/promise.js
Expand Up @@ -26,7 +26,9 @@ export default function(should, Assertion) {

var obj = this.obj;

should(obj).have.property("then").which.is.a.Function();
should(obj)
.have.property("then")
.which.is.a.Function();
});

/**
Expand Down
8 changes: 6 additions & 2 deletions lib/ext/type.js
Expand Up @@ -210,7 +210,9 @@ export default function(should, Assertion) {
Assertion.add("iterable", function() {
this.params = { operator: "to be iterable" };

should(this.obj).have.property(Symbol.iterator).which.is.a.Function();
should(this.obj)
.have.property(Symbol.iterator)
.which.is.a.Function();
});

/**
Expand All @@ -223,7 +225,9 @@ export default function(should, Assertion) {
Assertion.add("iterator", function() {
this.params = { operator: "to be iterator" };

should(this.obj).have.property("next").which.is.a.Function();
should(this.obj)
.have.property("next")
.which.is.a.Function();
});

/**
Expand Down
6 changes: 4 additions & 2 deletions lib/index.js
Expand Up @@ -3,10 +3,12 @@ import should from "./should";
var defaultProto = Object.prototype;
var defaultProperty = "should";

var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeGlobal =
typeof global == "object" && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var freeSelf =
typeof self == "object" && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function("return this")();
Expand Down
19 changes: 16 additions & 3 deletions package.json
Expand Up @@ -25,14 +25,19 @@
"eslint-config-shouldjs": "^1.0.0",
"mocha": "latest",
"mocha-better-spec-reporter": "latest",
"prettier": "^1.5.3",
"prettier": "^1.6.1",
"rollup": "^0.49.1",
"rollup-plugin-node-resolve": "^3.0.0",
"tslint": "^5.7.0",
"typescript": "^2.4.2",
"zuul": "latest"
},
"keywords": ["test", "bdd", "assert", "should"],
"keywords": [
"test",
"bdd",
"assert",
"should"
],
"main": "./index.js",
"license": "MIT",
"dependencies": {
Expand All @@ -42,5 +47,13 @@
"should-type-adaptors": "^1.0.1",
"should-util": "^1.0.0"
},
"files": ["cjs/*", "es6/*", "as-function.js", "index.js", "should.js", "LICENSE", "*.md"]
"files": [
"cjs/*",
"es6/*",
"as-function.js",
"index.js",
"should.js",
"LICENSE",
"*.md"
]
}

0 comments on commit 90bf91e

Please sign in to comment.