feat(test): testing infrastructure
This commit is contained in:
parent
d974567a8d
commit
ae1df3e7a8
9 changed files with 668 additions and 3 deletions
17
scripts/test.sh
Executable file
17
scripts/test.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if command -v luarocks &> /dev/null; then
|
||||
luarocks test --local
|
||||
else
|
||||
echo "luarocks not found, running nvim directly..."
|
||||
nvim --headless --noplugin \
|
||||
-u spec/minimal_init.lua \
|
||||
-c "lua require('busted.runner')({ standalone = false })" \
|
||||
-c "qa!"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue