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