Skip to content

Commit a506899

Browse files
committed
Merge branch 'main' into feat/island
Resolve conflict in package.json, `test:data` runner
2 parents 0964bf2 + 12a92b2 commit a506899

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- name: Install modules
1818
run: npm ci
19+
- name: Migrate the database
20+
run: npm run db:migrate
21+
- name: Run data tests
22+
run: npm run test:data
23+
- name: Seed the data
24+
run: npm run db:seed
1925
- name: Run unit tests
2026
run: npm run test
2127
- name: Run e2e tests

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "idn-area",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "API that provides information about Indonesia administrative area.",
55
"author": "Fityan",
66
"private": false,
@@ -16,7 +16,6 @@
1616
"prisma:gen": "prisma generate",
1717
"db:migrate": "prisma db push",
1818
"db:seed": "prisma db seed",
19-
"postinstall": "npm run prisma:gen",
2019
"start": "nest start",
2120
"start:dev": "nest start --watch",
2221
"start:debug": "nest start --debug --watch",
@@ -26,7 +25,7 @@
2625
"test:cov": "jest --coverage",
2726
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
2827
"test:e2e": "jest --config ./test/jest-e2e.json",
29-
"test:data": "npm run test:e2e ./test/data.e2e-spec.ts"
28+
"test:data": "jest --config ./test/jest-e2e.json ./test/data.e2e-spec.ts"
3029
},
3130
"prisma": {
3231
"seed": "ts-node -r tsconfig-paths/register --transpile-only prisma/seed.ts"

test/app.e2e-spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ describe('AppController (e2e)', () => {
1111
it('/ (GET)', async () => {
1212
const res = await tester.expectOk('/');
1313

14-
expect(res.json()).toEqual({
15-
message: 'Welcome to Indonesia Area API.',
16-
version: '1.0.0',
17-
docs: '/docs',
18-
});
14+
expect(res.json()).toEqual(
15+
expect.objectContaining({
16+
message: expect.any(String),
17+
version: process.env.npm_package_version,
18+
}),
19+
);
1920
});
2021

2122
afterAll(async () => {

0 commit comments

Comments
 (0)