summaryrefslogtreecommitdiff
path: root/js/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test.js')
-rwxr-xr-xjs/test.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/js/test.js b/js/test.js
index 6cb7c98..2e8b5c3 100755
--- a/js/test.js
+++ b/js/test.js
@@ -3,8 +3,24 @@
var fs = require('fs');
var commonmark = require('./lib/index.js');
-var ansi = require('./ansi/ansi');
-var cursor = ansi(process.stdout);
+
+// Home made mini-version of the npm ansi module:
+var escSeq = function(s) {
+ return function (){
+ process.stdout.write('\u001b' + s);
+ return this;
+ };
+};
+var cursor = {
+ write: function (s) {
+ process.stdout.write(s);
+ return this;
+ },
+ green: escSeq('[0;32m'),
+ red: escSeq('[0;31m'),
+ cyan: escSeq('[0;36m'),
+ reset: escSeq('[0;30m'),
+};
var writer = new commonmark.HtmlRenderer();
var reader = new commonmark.DocParser();