-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 688 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 688 Bytes
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
SRC_DIR=lua
TESTS_ROOT=tests
TESTS_DIR?=${TESTS_ROOT}/specs
PREPARE_CONFIG=${TESTS_ROOT}/utils/prepare-config.lua
TEST_CONFIG=${TESTS_ROOT}/utils/test-config.lua
TEST_TIMEOUT?=60000
.PHONY: test tests lint format all
all: lint format tests
tests:
@nvim \
--headless \
-u ${PREPARE_CONFIG} \
"+PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TEST_CONFIG}', timeout = ${TEST_TIMEOUT}, sequential = true }"
test:
@nvim \
--headless \
-u ${PREPARE_CONFIG} \
"+PlenaryBustedDirectory ${FILE} { minimal_init = '${TEST_CONFIG}', timeout = ${TEST_TIMEOUT} }"
lint:
luacheck ${SRC_DIR} ${TESTS_DIR}
format:
stylua ${SRC_DIR} ${TESTS_DIR} --config-path=.stylua.toml