Note E2E tests: Use on-disk sqlite to aid debugging

It was helpful to inspect database contents while the code was stopped by the debugger. Therefore the E2E test database is now persisted on disk and cleared before every test-run.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-09-22 20:09:36 +02:00
parent cf88cde551
commit 2030141c66
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -21,7 +21,7 @@ describe('Notes', () => {
GroupsModule,
TypeOrmModule.forRoot({
type: 'sqlite',
database: ':memory:',
database: './hedgedoc-e2e.sqlite',
autoLoadEntities: true,
synchronize: true,
}),
@ -31,6 +31,8 @@ describe('Notes', () => {
app = moduleRef.createNestApplication();
await app.init();
notesService = moduleRef.get(NotesService);
const noteRepository = moduleRef.get('NoteRepository');
noteRepository.clear();
});
it(`POST /notes`, async () => {