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

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Sep 3, 2017
1 parent 90bf91e commit c946259
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 40 deletions.
19 changes: 3 additions & 16 deletions package.json
Expand Up @@ -15,7 +15,7 @@
"build": "npm run cjs && npm run es6",
"prepare": "npm run build && npm run browser",
"pretest": "npm run build",
"test": "mocha -R mocha-better-spec-reporter --color --check-leaks ./test/*.test.js ./test/**/*.test.js",
"test": "mocha -R mocha-better-spec-reporter --require ./cjs/should --color --check-leaks ./test/*.test.js ./test/**/*.test.js",
"zuul": "zuul -- ./test/**/*.test.js ./test/*.test.js",
"browser": "rollup -c rollup.config.js --input ./lib/umd.js --output.format=iife --output.file ./should.js"
},
Expand All @@ -32,12 +32,7 @@
"typescript": "^2.4.2",
"zuul": "latest"
},
"keywords": [
"test",
"bdd",
"assert",
"should"
],
"keywords": ["test", "bdd", "assert", "should"],
"main": "./index.js",
"license": "MIT",
"dependencies": {
Expand All @@ -47,13 +42,5 @@
"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"]
}
2 changes: 0 additions & 2 deletions test/exist.test.js
Expand Up @@ -2,8 +2,6 @@
* Module dependencies.
*/

var should = require("../");

function err(fn, msg) {
try {
fn();
Expand Down
10 changes: 10 additions & 0 deletions test/exports.test.js
@@ -0,0 +1,10 @@
var assert = require("assert");

// should global
assert(typeof global.should === "function");

var should = require("../cjs/should");

// should default export
assert(typeof should === "function");
assert(typeof should.Assertion === "function");
2 changes: 1 addition & 1 deletion test/ext/assert.test.js
Expand Up @@ -19,7 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var assert = require("../../");
var assert = should;

var keys = Object.keys;

Expand Down
1 change: 0 additions & 1 deletion test/ext/bool.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
require("../../");

describe("bool", function() {
it("test true", function() {
Expand Down
1 change: 0 additions & 1 deletion test/ext/contain.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
require("../../");

describe("contain*", function() {
it("test containEql", function() {
Expand Down
3 changes: 1 addition & 2 deletions test/ext/eql.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err,
should = require("../../");
var err = require("../util").err;

describe("eql", function() {
it("test eql(val)", function() {
Expand Down
1 change: 0 additions & 1 deletion test/ext/error.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
require("../../");

describe("error", function() {
it("test throw()", function() {
Expand Down
1 change: 0 additions & 1 deletion test/ext/match.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
var should = require("../../");

describe("match", function() {
it("test string match(regexp)", function() {
Expand Down
1 change: 0 additions & 1 deletion test/ext/number.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
require("../../");

describe("number", function() {
it("test NaN", function() {
Expand Down
2 changes: 0 additions & 2 deletions test/ext/promise.test.js
@@ -1,5 +1,3 @@
var should = require("../../");

var Promise = require("bluebird");

function promised(value) {
Expand Down
1 change: 0 additions & 1 deletion test/ext/property.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
require("../../");

describe("property", function() {
it("test enumerable(name)", function() {
Expand Down
1 change: 0 additions & 1 deletion test/ext/string.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err;
require("../../");

describe("string", function() {
it("test startWith()", function() {
Expand Down
3 changes: 1 addition & 2 deletions test/ext/type.test.js
@@ -1,5 +1,4 @@
var err = require("../util").err,
should = require("../../");
var err = require("../util").err;

var AssertionError = require("assert").AssertionError;
var util = require("util");
Expand Down
2 changes: 0 additions & 2 deletions test/nested.test.js
@@ -1,5 +1,3 @@
var should = require("../");

var util = require("./util");

should.Assertion.add(
Expand Down
1 change: 0 additions & 1 deletion test/not.test.js
@@ -1,4 +1,3 @@
var should = require("../");
var err = require("./util").err;

var a = 10;
Expand Down
2 changes: 0 additions & 2 deletions test/perf.test.js
@@ -1,5 +1,3 @@
require("../");

function mockComplexObject(prefix, depth, width) {
if (depth <= 0) {
return "value-" + prefix;
Expand Down
1 change: 0 additions & 1 deletion test/should.test.js
Expand Up @@ -2,7 +2,6 @@
* Module dependencies.
*/

var should = require("../");
var assert = require("assert");

describe("should", function() {
Expand Down
2 changes: 0 additions & 2 deletions test/util.js
@@ -1,5 +1,3 @@
var should = require("../");

function err(fn, msg) {
if (arguments.length > 2) {
msg = Array.prototype.slice.call(arguments, 1).join("\n");
Expand Down

0 comments on commit c946259

Please sign in to comment.