-
-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: moves to eslint and starts dockerization * fix(websocket): fix jest not exiting properly Because I was using `io.connect()` without a properport, socketIo was not properly disconnecting after the test. Now that I am useing `io.connect(await app.getUrl())` everything works just fine fix #14 * ci: starts dockerizing the e2e testing process I'm tired of seeing CRON failures so I'm also adding in the necessary service to the cron.yml for the moment. I'll get it all fixed in the future * test(typeorm): fixes up typeorm e2e tests with docker-compose * feat: removes typeorm-graphql-sample The TypeOrm-GraphQL-Sample project is removed as there is no need for two sample projects to use TypeORM. The point of the repository is to show how testing can be done with NestJS. As there is a fully working typeorm-sample project and a graphql-sample project, there is no need to combine the two. BREAKING CHANGE: removal of the typeorm-graphql-sample * feat(e2e): adds docker-compose for e2e tests There's still some bugs with how the microservices tests were implemented, I'll need to spend more time on that, but now the TypeORM test has an actual database to query and use. Mongo is next, but I want to get rid of the failing CRON test for now. * fix: fixes microservice tests
- Loading branch information
Showing
84 changed files
with
3,419 additions
and
3,821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
node_modules/ | ||
.git/ | ||
dist/ | ||
coverage/ | ||
.vscode/ | ||
.github/ | ||
docker-compose* | ||
LICENSE | ||
*.md | ||
.sonarcloud* | ||
.editorconfig | ||
commitlint* | ||
*.gql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', | ||
], | ||
plugins: ['@typescript-eslint'], | ||
parserOptions: { | ||
source: 'module', | ||
ecmaVersion: 2018, | ||
}, | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
'no-control-regex': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'no-dupe-class-members': 'off', | ||
'sort-imports': [ | ||
'error', | ||
{ ignoreDeclarationSort: true, ignoreCase: true }, | ||
], | ||
'prettier/prettier': 'warn', | ||
}, | ||
ignorePatterns: ['*.d.ts', 'dist/*', '**/node_modules/*', 'lib/*', '*.js'], | ||
globals: { | ||
WeakSet: 'readonly', | ||
Promise: 'readonly', | ||
Reflect: 'readonly', | ||
Symbol: 'readonly', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:12 as BASE | ||
WORKDIR /app | ||
COPY package*.json \ | ||
nest-cli.json \ | ||
tsconfig*.json \ | ||
./ | ||
RUN npm i | ||
# allow ability to pass in an arg for build time changes | ||
ARG APP_NAME="complex-sample" | ||
COPY apps/$APP_NAME/ ./apps/$APP_NAME/ | ||
# assign passed are to env for runtime effects | ||
ENV APP_NAME ${APP_NAME} | ||
# use env var at runtime | ||
CMD ["npm", "run", "test", "--", "--config", "apps/$APP_NAME/test/jest-e2e.json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.