feat: wire HuntingController/HuntingModule and enrich current-location with monster pool
Registers HuntingModule (POST /api/hunts) into the DI graph alongside its new entities, and adds possibleMonsters (enabled LocationMonster pool, weight-descending, empty when hunting is disabled) to WorldService.getCurrentLocation. Also updates the pre-existing DB-less app.e2e-spec.ts to override HuntingModule the same way the other feature modules already are, since it now needs a real DataSource.
This commit is contained in:
@@ -6,6 +6,7 @@ import { AppModule } from './../src/app.module';
|
||||
import { CharactersModule } from './../src/characters/characters.module';
|
||||
import { DatabaseModule } from './../src/database/database.module';
|
||||
import { configureApplication } from './../src/app.config';
|
||||
import { HuntingModule } from './../src/hunting/hunting.module';
|
||||
import { TravelModule } from './../src/travel/travel.module';
|
||||
import { WorldModule } from './../src/world/world.module';
|
||||
|
||||
@@ -21,6 +22,9 @@ class TestTravelModule {}
|
||||
@Module({})
|
||||
class TestWorldModule {}
|
||||
|
||||
@Module({})
|
||||
class TestHuntingModule {}
|
||||
|
||||
describe('API (e2e)', () => {
|
||||
let app: INestApplication<App>;
|
||||
|
||||
@@ -36,6 +40,8 @@ describe('API (e2e)', () => {
|
||||
.useModule(TestTravelModule)
|
||||
.overrideModule(WorldModule)
|
||||
.useModule(TestWorldModule)
|
||||
.overrideModule(HuntingModule)
|
||||
.useModule(TestHuntingModule)
|
||||
.compile();
|
||||
|
||||
app = moduleFixture.createNestApplication();
|
||||
|
||||
Reference in New Issue
Block a user