Fixing test case to update schema when updating column name.

This commit is contained in:
mike12345567 2024-04-05 18:35:56 +01:00
parent 9da10c790e
commit 2876085b61
1 changed files with 8 additions and 0 deletions

View File

@ -129,12 +129,20 @@ describe.each([
name: "test",
})
const { name, ...otherColumns } = testTable.schema
const updatedTable = await config.api.table.save({
...testTable,
_rename: {
old: "name",
updated: "updatedName",
},
schema: {
...otherColumns,
updatedName: {
...name,
name: "updatedName",
},
},
})
expect(updatedTable.name).toEqual(testTable.name)