Skip to content

Commit

Permalink
base
Browse files Browse the repository at this point in the history
  • Loading branch information
notusertelken committed Oct 4, 2022
1 parent 4d958c8 commit 8ec7029
Show file tree
Hide file tree
Showing 32 changed files with 739 additions and 151 deletions.
17 changes: 12 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
services:
broker:
image: nats
command: --debug
expose:
- '4222'
image: bitnami/rabbitmq:latest
ports:
- '8222:8222'
- '4369:4369'
- '5551:5551'
- '5552:5552'
- '5672:5672'
- '25672:25672'
- '15672:15672'
volumes:
- 'rabbitmq_data:/bitnami/rabbitmq/mnesia'
volumes:
rabbitmq_data:
driver: local
17 changes: 17 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
displayName: 'authorization',
moduleFileExtensions: ['ts', 'js', 'html'],
rootDir: '.',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': 'ts-jest',
},
testMatch: ['<rootDir>/src/**/*spec.ts'],
// preset: '../../jest.preset.ts',
// globals: {
// 'ts-jest': {
// tsconfig: '<rootDir>/tsconfig.spec.json',
// },
// },
// coverageDirectory: '../../coverage/apps/authorization',
};
10 changes: 10 additions & 0 deletions jest.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const baseConfig = require('./jest.config');

module.exports = {
...baseConfig,
testMatch: ['<rootDir>/test/**/*.e2e-spec.ts'],
setupFiles: ['<rootDir>/jest.env.ts'],
moduleNameMapper: {
'@authz/(.*)': '<rootDir>/src/$1',
},
};
4 changes: 4 additions & 0 deletions jest.env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
process.env.PORT = '9990';
process.env.BROKER_PORT = '5672';
process.env.BROKER_URI = 'amqp://user:bitnami@localhost:5672';
process.env.QUEUE = 'authz';
Loading

0 comments on commit 8ec7029

Please sign in to comment.