Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

use stubbed symbol

Craig Taub60652429a1f6
diff --git a/test/reporters/list.spec.js b/test/reporters/list.spec.js
index f2536e5a..00fc58ed 100644
--- a/test/reporters/list.spec.js
+++ b/test/reporters/list.spec.js
@@ -103,6 +103,9 @@ describe('List reporter', function () {
Base.cursor = cachedCursor;
});
it('should write expected symbol, title and duration to the console', function () {
+ var cachedSymbols = Base.symbols;
+ var expectedOkSymbol = 'OK';
+ Base.symbols.ok = expectedOkSymbol;
var cachedCursor = Base.cursor;
Base.cursor.CR = function () {};
var expectedTitle = 'some title';
@@ -123,9 +126,10 @@ describe('List reporter', function () {
process.stdout.write = stdoutWrite;
- stdout[0].should.equal(' ✓ ' + expectedTitle + ': ' + expectedDuration + 'ms\n');
+ stdout[0].should.equal(' ' + expectedOkSymbol + ' ' + expectedTitle + ': ' + expectedDuration + 'ms\n');
Base.cursor = cachedCursor;
+ Base.symbols = cachedSymbols;
});
});
describe('on fail', function () {