-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
53 lines (37 loc) · 1.29 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
export PATH := $(shell npm bin):$(PATH)
build:
rm -rf dist || true
$(shell npm bin)/tsc -p tsconfig.json
$(shell npm bin)/tsc -p test/tsconfig.json
chmod +x dist/bin.js
node dist/utils/packStdLib.js
GREP="."
TEST_FILE="test/*.spec.ts"
DEBUG_TYPES=0
just-test:
DEBUG_TYPES=$(DEBUG_TYPES) \
node ./node_modules/mocha/bin/_mocha --grep "$(GREP)" $(TEST_FILE)
test: | build just-test
xml-test:
MOCHA_FILE=./test/TEST-RESULTS.xml \
$(shell npm bin)/mocha --reporter mocha-junit-reporter
coverage:
$(shell npm bin)/nyc ./node_modules/mocha/bin/_mocha
ci-test: | lint test e2e
azure-test: | lint xml-test e2e
inspect: build
node --inspect ./node_modules/mocha/bin/_mocha --require source-map-support/register test/*.spec.js
watch: build
$(shell npm bin)/tsc -p tsconfig.json --watch & $(shell npm bin)/tsc -p test/tsconfig.json --watch
lint:
echo "true"
# $(shell npm bin)/tslint src/**/*.ts --project tsconfig.json
e2e:
$(MAKE) md-tests
cd test/fixtures/cli/smoke && ../../../../dist/bin.js main.lys --test --debug --wast
cd test/fixtures/cli/custom-lib && ../../../../dist/bin.js main.lys --test --debug --wast --lib lib.js
md-tests: build
$(shell npm bin)/ts-node test/RunModulesFolder.ts
snapshot: export UPDATE_AST=true
snapshot: just-test
.PHONY: build test snapshot coverage dist