diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-04-18 21:43:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-18 21:43:51 +0300 |
commit | 6a97e43ff69795c53c1b8dff63fc6a5cbdba8ca8 (patch) | |
tree | 5d3b8790c025ba8664a9fab1dbecfbb1f2b58dca /tests/lib/mocha-3.1.2/test/reporters/nyan.spec.js | |
parent | ac9d6ab9ee5cf80ad2a769d40004c20410dc1053 (diff) |
update mocha to 3.1.2 (#11625)
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.js | 31 |
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(); + }); +}); |