fix(test): migration error
This commit is contained in:
parent
c492977233
commit
5e89a02044
@ -31,14 +31,14 @@ export class ApplicationVersion {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async update() {
|
async update(version?: string) {
|
||||||
await this.collection.sync();
|
await this.collection.sync();
|
||||||
await this.collection.model.destroy({
|
await this.collection.model.destroy({
|
||||||
truncate: true,
|
truncate: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.collection.model.create({
|
await this.collection.model.create({
|
||||||
value: this.app.getVersion(),
|
value: version || this.app.getVersion(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ describe('nocobase-admin-menu', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
app = await startApp();
|
app = await startApp();
|
||||||
|
await app.version.update('0.17.0-alpha.7');
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user