Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/mocha-3.1.2/test/reporters/nyan.spec.js')
-rw-r--r--tests/lib/mocha-3.1.2/test/reporters/nyan.spec.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/reporters/nyan.spec.js b/tests/lib/mocha-3.1.2/test/reporters/nyan.spec.js
new file mode 100644
index 0000000000..07c455efd3
--- /dev/null
+++ b/tests/lib/mocha-3.1.2/test/reporters/nyan.spec.js
@@ -0,0 +1,31 @@
+'use strict';
+
+var reporters = require('../../').reporters;
+var NyanCat = reporters.Nyan;
+
+describe('nyan face', function () {
+ it('nyan face:(x .x) when "failures" at least one', function () {
+ var nyanCat = new NyanCat({on: function () {}});
+ nyanCat.stats = { passes: 2, pending: 1, failures: 1 };
+ nyanCat.face().should.equal('( x .x)');
+ });
+
+ it('expected nyan face:(x .x) when "pending" at least one and no failing', function () {
+ var nyanCat = new NyanCat({on: function () {}});
+ nyanCat.stats = { passes: 2, pending: 1, failures: 0 };
+ nyanCat.face().should.equal('( o .o)');
+ });
+
+ it('expected nyan face:(^ .^) when "passing" only', function () {
+ var nyanCat = new NyanCat({on: function () {}});
+ nyanCat.stats = { passes: 1, pending: 0, failures: 0 };
+ nyanCat.face().should.equal('( ^ .^)');
+ });
+
+ it('nyan face:(- .-) when otherwise', function (done) {
+ var nyanCat = new NyanCat({on: function () {}});
+ nyanCat.stats = { passes: 0, pending: 0, failures: 0 };
+ nyanCat.face().should.equal('( - .-)');
+ done();
+ });
+});