We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getModelToken should be exported so that it's possible to provide stable test doubles.
getModelToken
Given service like this:
export class SomeService { constructor(@InjectModel(SomeEntity) private readonly container: Container) {} }
What we have to do now:
Test.createTestingModule({ providers: [ SomeService, { provide: `${SomeEntity}AzureCosmosDbModel`, useValue: jest.mocked({}) }, ], });
How it should be:
Test.createTestingModule({ providers: [ SomeService, { provide: getModelToken(SomeEntity), useValue: jest.mocked({}) }, ], });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
getModelToken
should be exported so that it's possible to provide stable test doubles.Given service like this:
What we have to do now:
How it should be:
The text was updated successfully, but these errors were encountered: