Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/datasource-mongo/test/create.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ describe('create', () => {
'mongodb://forest:secret@127.0.0.1:27017/movies?authSource=admin',
);

connection.dropDatabase();
await connection.dropDatabase();

try {
const movieSchema = new Schema({ title: String });
const Movie = connection.model('Movies', movieSchema);
await Movie.createCollection();
await new Movie({ title: 'Inception' }).save();
} finally {
await connection.close(true);
Expand Down
3 changes: 2 additions & 1 deletion packages/datasource-mongo/test/index.ssh.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ describe('Datasource Mongo', () => {
'mongodb://forest:secret@127.0.0.1:27017/movies-ssh?authSource=admin',
);

connection.dropDatabase();
await connection.dropDatabase();

try {
const movieSchema = new Schema({ title: String });
const Movie = connection.model('Movies', movieSchema);
await Movie.createCollection();
await new Movie({ title: 'Inception' }).save();
} finally {
await connection.close(true);
Expand Down
Loading