Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunderl committed Apr 20, 2020
1 parent c54f375 commit 657bdcd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions sample-apps/blank/0-run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -eo pipefail
if [ ! -d node_modules ]; then
echo "Installing libraries..."
npm install
fi
REGION=$(aws configure get region)
AWS_REGION=$REGION npm run test
1 change: 1 addition & 0 deletions sample-apps/blank/1-create-bucket.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -eo pipefail
BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \t\n')
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
echo $BUCKET_NAME > bucket-name.txt
Expand Down
5 changes: 3 additions & 2 deletions sample-apps/blank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"version": "1.0.0",
"private": true,
"devDependencies": {
"aws-sdk": "2.631.0"
"aws-sdk": "2.631.0",
"jest": "25.4.0"
},
"dependencies": {
"aws-xray-sdk-core": "1.1.2"
},
"scripts": {
"start": "node app.js"
"test": "jest"
}
}

0 comments on commit 657bdcd

Please sign in to comment.