Skip to content

Commit

Permalink
Update test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichvonStein committed Dec 18, 2024
1 parent 94a7a7d commit d140840
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/common/tests/db/schema/Schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })]
Expand All @@ -36,7 +36,7 @@ describe('Schema', () => {
}),
posts: new Table({
title: column.text,
content: column.text,
content: column.text
})
};
const schema = new Schema(schemaDefinition);
Expand All @@ -63,7 +63,7 @@ describe('Schema', () => {

const invalidSchema = new Schema({
invalidTable: new Table({
'invalid name': column.text,
'invalid name': column.text
})
});

Expand All @@ -78,7 +78,7 @@ describe('Schema', () => {
}),
posts: new Table({
title: column.text,
content: column.text,
content: column.text
})
});

Expand Down

0 comments on commit d140840

Please sign in to comment.