diff --git a/test/isBrowser/isBrowser.js b/test/isBrowser/isBrowser.js new file mode 100644 index 000000000..3399dc227 --- /dev/null +++ b/test/isBrowser/isBrowser.js @@ -0,0 +1,2 @@ +const isBrowser = () => ![typeof window, typeof document].includes('undefined'); +module.exports = isBrowser; \ No newline at end of file diff --git a/test/isBrowser/isBrowser.test.js b/test/isBrowser/isBrowser.test.js new file mode 100644 index 000000000..3f0c1adf9 --- /dev/null +++ b/test/isBrowser/isBrowser.test.js @@ -0,0 +1,13 @@ +const test = require('tape'); +const isBrowser = require('./isBrowser.js'); + +test('Testing isBrowser', (t) => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + t.true(typeof isBrowser === 'function', 'isBrowser is a Function'); + //t.deepEqual(isBrowser(args..), 'Expected'); + //t.equal(isBrowser(args..), 'Expected'); + //t.false(isBrowser(args..), 'Expected'); + //t.throws(isBrowser(args..), 'Expected'); + t.end(); +}); \ No newline at end of file diff --git a/test/testlog b/test/testlog index 5d35e28ac..6b332d3f1 100644 --- a/test/testlog +++ b/test/testlog @@ -1,4 +1,4 @@ -Test log for: Sun Mar 18 2018 20:40:36 GMT+0000 (UTC) +Test log for: Mon Mar 19 2018 20:42:22 GMT+0000 (UTC) > 30-seconds-of-code@0.0.2 test /home/travis/build/Chalarangelo/30-seconds-of-code > tape test/**/*.test.js | tap-spec @@ -812,6 +812,10 @@ Test log for: Sun Mar 18 2018 20:40:36 GMT+0000 (UTC) ✔ passed value is not a boolean ✔ passed value is not a boolean + Testing isBrowser + + ✔ isBrowser is a Function + Testing isDivisible ✔ isDivisible is a Function @@ -1956,15 +1960,15 @@ Test log for: Sun Mar 18 2018 20:40:36 GMT+0000 (UTC) ✔ zipWith is a Function ✔ Sends a GET request - ✔ Sends a POST request ✔ Runs the function provided + ✔ Sends a POST request ✔ Runs promises in series ✔ Works as expecting, passing arguments properly ✔ Works with multiple promises - total: 998 - passing: 998 - duration: 2.7s + total: 999 + passing: 999 + duration: 2.5s