undeexcepturi
Version:
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.
35 lines (24 loc) • 700 B
text/typescript
import { Entity, PrimaryKey, Property, MikroORM, EntityCaseNamingStrategy } from '@mikro-orm/postgresql';
()
class A {
()
id!: string;
()
prop?: string;
}
describe('GH issue 472', () => {
let orm: MikroORM;
beforeAll(async () => {
orm = await MikroORM.init({
entities: [A],
dbName: 'mikro_orm_test_gh472',
namingStrategy: EntityCaseNamingStrategy,
});
await orm.schema.refreshDatabase();
});
afterAll(() => orm.close(true));
test(`case sensitive table names`, async () => {
await expect(orm.schema.updateSchema()).resolves.toBeUndefined();
await orm.schema.dropDatabase(orm.config.get('dbName'));
});
});