diff --git a/packages/common/tests/db/schema/Schema.test.ts b/packages/common/tests/db/schema/Schema.test.ts index c731eb62..136803b3 100644 --- a/packages/common/tests/db/schema/Schema.test.ts +++ b/packages/common/tests/db/schema/Schema.test.ts @@ -5,13 +5,13 @@ import { column, ColumnType } from '../../../src/db/schema/Column'; import { Column } from '../../../lib'; describe('Schema', () => { - it('should fail if array is passed and not a table object', () => { + it('should fail if an array of tables using the new syntax is passed to schem', () => { const table1 = new Table({ name: column.text }); const table2 = new Table({ age: { type: ColumnType.INTEGER } }); expect(() => new Schema([table1, table2])).toThrow(); }); - it('should create a schema with an array of tables', () => { + it('should create a schema with an array of tables using the old syntax', () => { const table1 = new Table({ name: 'table1', columns: [new Column({ name: 'name', type: ColumnType.TEXT })] @@ -36,7 +36,7 @@ describe('Schema', () => { }), posts: new Table({ title: column.text, - content: column.text, + content: column.text }) }; const schema = new Schema(schemaDefinition); @@ -63,7 +63,7 @@ describe('Schema', () => { const invalidSchema = new Schema({ invalidTable: new Table({ - 'invalid name': column.text, + 'invalid name': column.text }) }); @@ -78,7 +78,7 @@ describe('Schema', () => { }), posts: new Table({ title: column.text, - content: column.text, + content: column.text }) });