fix: test

This commit is contained in:
Chareice 2023-02-11 09:41:59 +08:00
parent 5e603b5a52
commit f69b062b4f
3 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@ interface Resource {
export class MockServer extends Application { export class MockServer extends Application {
async loadAndInstall(options: any = {}) { async loadAndInstall(options: any = {}) {
await this.load({ method: 'install' }); await this.load({ method: 'install' });
await this.install({ await this.install({
...options, ...options,
sync: { sync: {

View File

@ -9,6 +9,7 @@ export async function createApp(options = {}) {
...options, ...options,
}); });
await app.db.sync({});
app.plugin(PluginErrorHandler, { name: 'error-handler' }); app.plugin(PluginErrorHandler, { name: 'error-handler' });
app.plugin(Plugin, { name: 'collection-manager' }); app.plugin(Plugin, { name: 'collection-manager' });
app.plugin(PluginUiSchema, { name: 'ui-schema-storage' }); app.plugin(PluginUiSchema, { name: 'ui-schema-storage' });

View File

@ -359,7 +359,6 @@ pgOnly()('Inherited Collection', () => {
const studentCollection = await db.getCollection('students'); const studentCollection = await db.getCollection('students');
console.log(studentCollection.fields);
await studentCollection.repository.create({ await studentCollection.repository.create({
values: { values: {
name: 'foo', name: 'foo',