Skip to content

Commit 9f3b408

Browse files
Merge pull request nestjs#3185 from BrunnerLivio/ci/sample-test
ci: Run sample e2e and unit test
2 parents 27d8bda + 5ebadc0 commit 9f3b408

36 files changed

Lines changed: 152 additions & 100 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ jobs:
145145
working_directory: ~/nest
146146
docker:
147147
- image: circleci/node:12
148+
environment:
149+
- DISABLE_OPENCOLLECTIVE: true
148150
steps:
149151
- checkout
150152
- *restore-cache

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"postbuild": "gulp move",
1515
"prebuild:prod": "npm run clean",
1616
"build:prod": "gulp build",
17-
"build:samples": "gulp install:samples && npm run build && gulp build:samples",
17+
"build:samples": "gulp install:samples && npm run build && gulp build:samples && gulp test:samples && gulp test:e2e:samples",
1818
"postinstall": "opencollective",
1919
"prerelease": "gulp copy-misc && gulp build --dist node_modules/@nestjs",
2020
"publish": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",

sample/01-cats-app/package-lock.json

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

sample/01-cats-app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:watch": "jest --watch",
1717
"test:cov": "jest --coverage",
1818
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
19-
"test:e2e": "jest --config ./test/jest-e2e.json"
19+
"test:e2e": "jest --config ./e2e/jest-e2e.json"
2020
},
2121
"dependencies": {
2222
"@nestjs/common": "6.8.4",
@@ -33,6 +33,7 @@
3333
"@nestjs/schematics": "6.7.0",
3434
"@nestjs/testing": "6.8.4",
3535
"@types/express": "4.17.1",
36+
"@types/jest": "^24.0.19",
3637
"@types/node": "10.14.22",
3738
"@types/supertest": "2.0.8",
3839
"jest": "24.9.0",

sample/02-gateways/package-lock.json

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

sample/02-gateways/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:watch": "jest --watch",
1717
"test:cov": "jest --coverage",
1818
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
19-
"test:e2e": "jest --config ./test/jest-e2e.json"
19+
"test:e2e": "echo 'No e2e tests implemented yet.'"
2020
},
2121
"dependencies": {
2222
"@nestjs/common": "6.8.4",

sample/03-microservices/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:watch": "jest --watch",
1717
"test:cov": "jest --coverage",
1818
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
19-
"test:e2e": "jest --config ./test/jest-e2e.json"
19+
"test:e2e": "echo 'No e2e tests implemented yet.'"
2020
},
2121
"dependencies": {
2222
"@nestjs/common": "6.8.4",

sample/04-grpc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:watch": "jest --watch",
1717
"test:cov": "jest --coverage",
1818
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
19-
"test:e2e": "jest --config ./test/jest-e2e.json"
19+
"test:e2e": "echo 'No e2e tests implemented yet.'"
2020
},
2121
"dependencies": {
2222
"@grpc/proto-loader": "0.5.2",

sample/05-sql-typeorm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:watch": "jest --watch",
1717
"test:cov": "jest --coverage",
1818
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
19-
"test:e2e": "jest --config ./test/jest-e2e.json"
19+
"test:e2e": "echo 'No e2e tests implemented yet.'"
2020
},
2121
"dependencies": {
2222
"@nestjs/common": "6.8.4",

sample/06-mongoose/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:watch": "jest --watch",
1717
"test:cov": "jest --coverage",
1818
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
19-
"test:e2e": "jest --config ./test/jest-e2e.json"
19+
"test:e2e": "echo 'No e2e tests implemented yet.'"
2020
},
2121
"dependencies": {
2222
"@nestjs/common": "6.8.4",

0 commit comments

Comments
 (0)