test-infra: re-enable 16 disabled server suites (jest DI + lib0 ESM) (#56)
16 suites were disabled via testPathIgnorePatterns due to two root causes: lib0 ESM not transformed (the @hocuspocus/server -> lib0/decoding.js chain) and stock 'should be defined' specs built via Test.createTestingModule without providers. Add lib0 to transformIgnorePatterns; convert the 14 DI placeholders to direct new X(...) instantiation with stub deps (keeping a real construct smoke test); re-enable the suites. Also updates the public-share limiter test to assert the fail-closed behavior from #62 (surfaced now that the suite runs). Full server suite: 67 passed, 689 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { StorageService } from './storage.service';
|
||||
|
||||
// Direct instantiation with a stub driver. The Test.createTestingModule form
|
||||
// failed to resolve the STORAGE_DRIVER_TOKEN at compile(); this smoke test only
|
||||
// needs the service to construct.
|
||||
describe('StorageService', () => {
|
||||
let service: StorageService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [StorageService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<StorageService>(StorageService);
|
||||
beforeEach(() => {
|
||||
service = new StorageService(
|
||||
{} as any, // storageDriver
|
||||
);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
|
||||
Reference in New Issue
Block a user