Skip to content

Commit 854a305

Browse files
committed
fix: update unit test
1 parent 5d85586 commit 854a305

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/CI-pipeline.yml

+15
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ name: "CI Process"
33
on: [push]
44

55
jobs:
6+
unit_test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@master
11+
12+
- name: Run unit testing
13+
run: |
14+
cd src/handlers
15+
for lambda in */; do
16+
cd "$lambda"
17+
echo "\nUNIT TEST: $lambda"
18+
npm install && npm test
19+
cd ..
20+
done
621
722
aws_sam:
823
runs-on: ubuntu-latest

src/handlers/get-data/tests/unit/test-handler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Tests index', function () {
1616
let response = JSON.parse(result.body);
1717

1818
expect(response).to.be.an('object');
19-
expect(response.message).to.be.equal("hello world");
19+
expect(response.message).to.be.equal("get data");
2020
// expect(response.location).to.be.an("string");
2121
});
2222
});

src/handlers/save-data/tests/unit/test-handler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Tests index', function () {
1616
let response = JSON.parse(result.body);
1717

1818
expect(response).to.be.an('object');
19-
expect(response.message).to.be.equal("hello world");
19+
expect(response.message).to.be.equal("save data");
2020
// expect(response.location).to.be.an("string");
2121
});
2222
});

0 commit comments

Comments
 (0)