fix(test): use ref config for example tests
This commit is contained in:
parent
b7d0b43fd2
commit
25d967bc84
|
@ -1,7 +1,6 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
EXAMPLES="$(find ./examples -name '*.yml')"
|
EXAMPLES="$(find ./examples -name '*.yml')"
|
||||||
echo "Found examples: ${EXAMPLES}"
|
|
||||||
|
|
||||||
while read -r example;
|
while read -r example;
|
||||||
do
|
do
|
||||||
|
@ -24,7 +23,12 @@ do
|
||||||
echo "Expected errors: ${EXPECTED_ERRORS}"
|
echo "Expected errors: ${EXPECTED_ERRORS}"
|
||||||
echo "Expected status: ${EXPECTED_STATUS}"
|
echo "Expected status: ${EXPECTED_STATUS}"
|
||||||
|
|
||||||
node out/index.js --rules "rules/${USE_RULES}.yml" --tag ${USE_TAGS} --source ${example}
|
node out/index.js \
|
||||||
|
--config-path ./docs \
|
||||||
|
--config-name config-stderr.yml \
|
||||||
|
--rules "rules/${USE_RULES}.yml" \
|
||||||
|
--tag ${USE_TAGS} \
|
||||||
|
--source ${example}
|
||||||
|
|
||||||
ACTUAL_STATUS=$?
|
ACTUAL_STATUS=$?
|
||||||
|
|
||||||
|
@ -34,3 +38,5 @@ do
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done <<< "${EXAMPLES}"
|
done <<< "${EXAMPLES}"
|
||||||
|
|
||||||
|
echo "All examples passed."
|
||||||
|
|
Loading…
Reference in New Issue