Skip to content

Commit

Permalink
fix(test): use ref config for example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jul 1, 2019
1 parent b7d0b43 commit 25d967b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/test-examples.sh
@@ -1,7 +1,6 @@
#! /bin/bash

EXAMPLES="$(find ./examples -name '*.yml')"
echo "Found examples: ${EXAMPLES}"

while read -r example;
do
Expand All @@ -24,7 +23,12 @@ do
echo "Expected errors: ${EXPECTED_ERRORS}"
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=$?

Expand All @@ -34,3 +38,5 @@ do
exit 1
fi
done <<< "${EXAMPLES}"

echo "All examples passed."

0 comments on commit 25d967b

Please sign in to comment.