Skip to content

Commit a0d2345

Browse files
committed
actually assert
1 parent aac149d commit a0d2345

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

tests/test-func/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/test-func/test-event.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"foo":"bar"}
1+
{"foo":"bar"}

tests/test.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ function assert_success() {
2929
function end_tests() {
3030
if ((FAILED > 0))
3131
then
32-
echo -e "${RED}Run ${TESTS} tests, ${FAILED} failed.${NC}"
32+
echo
33+
echo -e "💀 ${RED}Run ${TESTS} tests, ${FAILED} failed.${NC}"
3334
exit $FAILED
3435
else
35-
echo -e "${GREEN}${TESTS} tests passed.${NC}"
36+
echo
37+
echo -e "👌 ${GREEN}${TESTS} tests passed.${NC}"
3638
exit 0
3739
fi
3840
}
@@ -61,6 +63,6 @@ unzip -o \
6163
-v /tmp/lambda:/var/task \
6264
lambci/lambda:provided < test-event.json | grep -v RequestId | grep -v '^\W*$' > test-out.log
6365

64-
cat test-out.log
66+
assert_success "when invoked, it produces expected output" diff test-event.json test-out.log
6567

6668
end_tests

0 commit comments

Comments
 (0)