From 73721f12072d77263e72a3b27cd5cf9409db9f8b Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Wed, 25 Jan 2017 19:45:26 +0100 Subject: [PATCH] Other: Moved checks whether a test case is applicable to parent case --- lib/aspromise/tests/index.js | 1 - lib/pool/tests/index.js | 1 - tests/lib_aspromise.js | 3 ++- tests/lib_inquire.js | 5 ++++- tests/lib_pool.js | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/aspromise/tests/index.js b/lib/aspromise/tests/index.js index e6c1ef80a..cfdb258a6 100644 --- a/lib/aspromise/tests/index.js +++ b/lib/aspromise/tests/index.js @@ -2,7 +2,6 @@ var tape = require("tape"); var asPromise = require(".."); -if (typeof Promise !== "undefined") tape.test("aspromise", function(test) { test.test(this.name + " - resolve", function(test) { diff --git a/lib/pool/tests/index.js b/lib/pool/tests/index.js index 5d1a921fe..59aa73f6b 100644 --- a/lib/pool/tests/index.js +++ b/lib/pool/tests/index.js @@ -2,7 +2,6 @@ var tape = require("tape"); var pool = require(".."); -if (typeof Uint8Array !== "undefined") tape.test("pool", function(test) { var alloc = pool(function(size) { return new Uint8Array(size); }, Uint8Array.prototype.subarray); diff --git a/tests/lib_aspromise.js b/tests/lib_aspromise.js index 248405753..249e7b478 100644 --- a/tests/lib_aspromise.js +++ b/tests/lib_aspromise.js @@ -1 +1,2 @@ -require("../lib/aspromise/tests"); +if (typeof Promise !== "undefined") + require("../lib/aspromise/tests"); diff --git a/tests/lib_inquire.js b/tests/lib_inquire.js index b42b1fd81..75e2ccfc6 100644 --- a/tests/lib_inquire.js +++ b/tests/lib_inquire.js @@ -1 +1,4 @@ -require("../lib/inquire/tests"); +var protobuf = require(".."); + +if (protobuf.util.isNode) + require("../lib/inquire/tests"); diff --git a/tests/lib_pool.js b/tests/lib_pool.js index 21c55ce8a..dc8ac69b8 100644 --- a/tests/lib_pool.js +++ b/tests/lib_pool.js @@ -1 +1,2 @@ -require("../lib/pool/tests"); +if (typeof Uint8Array !== "undefined") + require("../lib/pool/tests");