Skip to content

Commit 13186d2

Browse files
committed
fix(newman): fixed newman test failing due to tsc build config
1 parent bf2d6e2 commit 13186d2

File tree

12 files changed

+29
-16
lines changed

12 files changed

+29
-16
lines changed

.dockerignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Dockerfile
22
docker-compose.yml
33
*.ts
44
**/*.ts
5-
src
5+
**/*.test.js
66
.husky
77
.gitignore
88
dev-server.js
@@ -11,4 +11,6 @@ service-collection.postman_collection.json
1111
tsconfig.json
1212
tslint.json
1313
logs
14-
cocverage
14+
coverage
15+
node_modules
16+
publish.sh

.github/workflows/release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ jobs:
2020
run: |
2121
npm ci
2222
npm run build
23-
- name: Test
24-
run: npm run test
25-
- name: Newman Tests
26-
run: npm run test:newman
23+
npm run test
24+
npm run test:newman
2725
Publish:
2826
runs-on: ubuntu-latest
2927
if: ${{ github.ref == 'refs/heads/main' }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,5 @@ dist
125125
### Node Patch ###
126126
# Serverless Webpack directories
127127
.webpack/
128-
app
128+
app/**/*.js
129+
app/**/*.d.ts

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM public.ecr.aws/lambda/nodejs:14
22

33
COPY . ${LAMBDA_TASK_ROOT}
44

5-
RUN npm ci
5+
RUN npm ci --only=production
66

77
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
88
CMD [ "app/index.handler" ]
File renamed without changes.
File renamed without changes.
File renamed without changes.

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ services:
33
app.handler:
44
ports:
55
- '9000:8080'
6-
build: .
7-
volumes:
8-
- .://var/task/
6+
build: .

jest.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22
module.exports = {
33
preset: 'ts-jest',
44
testEnvironment: 'node',
5+
testMatch: [
6+
"**/__tests__/**/*.ts?(x)",
7+
"**/?(*.)+(spec|test).ts?(x)"
8+
],
9+
collectCoverage: true,
10+
// collectCoverageFrom: [
11+
// "./app/**/*.ts",
12+
// "!./app/**/*.js",
13+
// "!./app/**/*.d.ts",
14+
// "!./app/**/*.(spec|test).ts"
15+
// ]
516
};

0 commit comments

Comments
 (0)