-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8101605
commit 73d6181
Showing
29 changed files
with
189 additions
and
93 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
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
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
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
11 changes: 11 additions & 0 deletions
11
libs/nesbus/tests/__env/utils/service-bus-env-setup/init-runtime.js
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,11 @@ | ||
const path = require('path'); | ||
const tsNode = require('ts-node'); | ||
const tsTransformPaths = require('typescript-transform-paths'); | ||
|
||
tsNode.register({ | ||
project: path.join(__dirname, 'tsconfig.json') | ||
}); | ||
|
||
tsTransformPaths.register(); | ||
|
||
module.exports = require('./jest-service-bus-test-environment').JestServiceBusTestEnvironment; |
31 changes: 0 additions & 31 deletions
31
libs/nesbus/tests/__env/utils/service-bus-env-setup/jest-service-bus-test-environment.js
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
libs/nesbus/tests/__env/utils/service-bus-env-setup/jest-service-bus-test-environment.ts
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,25 @@ | ||
import { JestEnvironmentConfig, EnvironmentContext } from '@jest/environment'; | ||
import JestEnvironmentNode from 'jest-environment-node'; | ||
|
||
export class JestServiceBusTestEnvironment extends JestEnvironmentNode { | ||
private sbEnvConfig: { envSetup?: boolean; envTeardown?: boolean; }; | ||
|
||
constructor(config: JestEnvironmentConfig, context: EnvironmentContext) { | ||
super(config, context); | ||
this.sbEnvConfig = config.projectConfig?.testEnvironmentOptions ?? {} as any; | ||
} | ||
|
||
async setup() { | ||
await super.setup(); | ||
if (this.sbEnvConfig.envSetup) { | ||
await require('./env-setup').run(); | ||
} | ||
} | ||
|
||
async teardown() { | ||
await super.teardown(); | ||
if (this.sbEnvConfig.envTeardown) { | ||
await require('./env-teardown').run(); | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
libs/nesbus/tests/__env/utils/service-bus-env-setup/tsconfig.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "../../../../../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"outDir": "../../../../../../dist/out-tsc", | ||
"declaration": true, | ||
"types": ["node"], | ||
"plugins": [ | ||
{ "transform": "typescript-transform-paths" }, | ||
{ "transform": "typescript-transform-paths", "afterDeclarations": true } | ||
] | ||
}, | ||
"ts-node": { | ||
"transpileOnly": true, | ||
"logError": true, | ||
"ignoreDiagnostics": [7006, 2683] | ||
}, | ||
"exclude": ["**/*.spec.ts", "tests/**/*.*", "benchmarks/**/*.*"], | ||
"include": ["**/*.ts"] | ||
} |
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
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.