Switch from jasmine to jest (#747)

Summary:
The reasons for switching to jest:
- easy snapshot testing so that we can easily verify the structure of the parse tree and MathML tree
- easy compilation of ES6 features for tests as we continue to expand our use of ES6

Test Plan:
- npm test
This commit is contained in:
Kevin Barabash
2017-07-11 14:16:26 -04:00
committed by Erik Demaine
parent 4480f2c987
commit 361c500a7f
12 changed files with 228 additions and 275 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: build dist lint setup copy serve clean metrics test zip contrib
.PHONY: build dist lint setup copy serve clean metrics test coverage zip contrib
build: lint build/katex.min.js build/katex.min.css contrib zip compress
ifeq ($(KATEX_DIST),skip)
@@ -101,7 +101,10 @@ serve: $(NIS)
$(NODE) server.js
test: $(NIS)
JASMINE_CONFIG_PATH=test/jasmine.json node_modules/.bin/jasmine
node_modules/.bin/jest
coverage: $(NIS)
node_modules/.bin/jest --coverage
PERL=perl
PYTHON=$(shell python2 --version >/dev/null 2>&1 && echo python2 || echo python)