-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: pick only one option attribute for test module
- Loading branch information
1 parent
6254af7
commit 65cfe0c
Showing
2 changed files
with
16 additions
and
10 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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { ModuleMetadata } from '@nestjs/common/interfaces/modules/module-metadata.interface'; | ||
import { MetadataScanner } from '@nestjs/core/metadata-scanner'; | ||
import { TestingModuleBuilder } from './testing-module.builder'; | ||
import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface'; | ||
import { | ||
TestingModuleBuilder, | ||
TestingModuleOptions, | ||
} from './testing-module.builder'; | ||
|
||
export class Test { | ||
private static readonly metadataScanner = new MetadataScanner(); | ||
|
||
public static createTestingModule( | ||
metadata: ModuleMetadata, | ||
contextOptions: NestApplicationContextOptions | undefined = undefined, | ||
options?: TestingModuleOptions, | ||
) { | ||
return new TestingModuleBuilder( | ||
this.metadataScanner, | ||
metadata, | ||
contextOptions, | ||
); | ||
return new TestingModuleBuilder(this.metadataScanner, metadata, options); | ||
} | ||
} |
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