mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
test: fix flaky test
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { RequestMethod } from '@nestjs/common';
|
import { RequestMethod } from '@nestjs/common';
|
||||||
import { loadPackage } from '@nestjs/common/utils/load-package.util.js';
|
import { loadPackage } from '@nestjs/common/utils/load-package.util.js';
|
||||||
|
import * as microservicesPackage from '@nestjs/microservices';
|
||||||
import { MicroserviceOptions } from '@nestjs/microservices';
|
import { MicroserviceOptions } from '@nestjs/microservices';
|
||||||
import { ApplicationConfig } from '../application-config.js';
|
import { ApplicationConfig } from '../application-config.js';
|
||||||
import { NestContainer } from '../injector/container.js';
|
import { NestContainer } from '../injector/container.js';
|
||||||
@@ -12,12 +13,13 @@ describe('NestApplication', () => {
|
|||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
// Pre-populate the package cache so that connectMicroservice()
|
// Pre-populate the package cache so that connectMicroservice()
|
||||||
// can synchronously retrieve @nestjs/microservices via loadPackageCached.
|
// can synchronously retrieve @nestjs/microservices via loadPackageCached.
|
||||||
|
// Use the already-imported module to avoid a slow dynamic import() on CI.
|
||||||
await loadPackage(
|
await loadPackage(
|
||||||
'@nestjs/microservices',
|
'@nestjs/microservices',
|
||||||
'NestApplication tests',
|
'NestApplication tests',
|
||||||
() => import('@nestjs/microservices'),
|
() => microservicesPackage,
|
||||||
);
|
);
|
||||||
}, 30_000);
|
});
|
||||||
|
|
||||||
describe('Hybrid Application', () => {
|
describe('Hybrid Application', () => {
|
||||||
class Interceptor {
|
class Interceptor {
|
||||||
|
|||||||
Reference in New Issue
Block a user