[Pkg-javascript-commits] [node-syntax-error] 21/47: failing test for html in javascript source

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:29:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-syntax-error.

commit 7e920a2621e9458ec6d928dcd61587683519699e
Author: James Halliday <mail at substack.net>
Date:   Sat Jul 26 14:39:29 2014 -0700

    failing test for html in javascript source
---
 test/html.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/test/html.js b/test/html.js
new file mode 100644
index 0000000..6158017
--- /dev/null
+++ b/test/html.js
@@ -0,0 +1,16 @@
+var test = require('tape');
+
+var fs = require('fs');
+var check = require('../');
+
+var src = '<html></html>';
+
+test(function (t) {
+    var err = check(src, 'foo.js');
+    t.ok(err);
+    t.equal(err.line, 1);
+    t.equal(err.column, 1);
+    t.equal(err.message, 'Unexpected token <');
+    t.ok(/foo.js:1/.test(err), 'foo.js:1');
+    t.end();
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-syntax-error.git



More information about the Pkg-javascript-commits mailing list