-
-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mongo): validate usage of migrator and entity generator
Closes #1801
- Loading branch information
Showing
6 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { MikroORM } from '@mikro-orm/core'; | ||
|
||
describe('Migrator', () => { | ||
|
||
test('not supported [mongodb]', async () => { | ||
const orm = await MikroORM.init({ type: 'mongo', dbName: 'mikro-orm-test', discovery: { warnWhenNoEntities: false } }, false); | ||
expect(() => orm.getMigrator()).toThrowError('MongoPlatform does not support Migrator'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import { MikroORM } from '@mikro-orm/core'; | ||
import { SchemaGenerator } from '@mikro-orm/knex'; | ||
|
||
describe('SchemaGenerator', () => { | ||
|
||
test('not supported [mongodb]', async () => { | ||
const orm = await MikroORM.init({ type: 'mongo', dbName: 'mikro-orm-test', discovery: { warnWhenNoEntities: false } }, false); | ||
expect(() => orm.getSchemaGenerator()).toThrowError('MongoPlatform does not use a schema generator'); | ||
expect(() => orm.getSchemaGenerator()).toThrowError('MongoPlatform does not support SchemaGenerator'); | ||
}); | ||
|
||
}); |