Improve testing

Summary:
Move dom creation into katex.js so our tests can test non-dom things, and add
some buildTree tests. Add some checks make utils.js work in node. Add support
for jasmine-node, to allow for command line unit testing.

Test Plan:
- Make sure tests work, in both the browser and with `make test`
- Make sure huxley screenshots didn't change

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13125
This commit is contained in:
Emily Eisenberg
2014-09-12 13:30:30 -07:00
parent 5cca3a299e
commit 403dca64ab
8 changed files with 62 additions and 16 deletions

View File

@@ -41,9 +41,9 @@ app.get("/katex.css", function(req, res, next) {
});
});
app.get("/test/katex-tests.js", function(req, res, next) {
app.get("/test/katex-spec.js", function(req, res, next) {
var b = browserify();
b.add("./test/katex-tests");
b.add("./test/katex-spec");
var stream = b.bundle({});