fix(plugin-collection-manager): test error
This commit is contained in:
parent
2a2d67e38b
commit
b398e65c9c
@ -58,7 +58,7 @@ describe('collections repository', () => {
|
|||||||
timestamps: true,
|
timestamps: true,
|
||||||
});
|
});
|
||||||
const [updated] = await Collection.repository.update({
|
const [updated] = await Collection.repository.update({
|
||||||
filterByTk: data.get('key') as any,
|
filterByTk: data.get('name') as any,
|
||||||
values: {
|
values: {
|
||||||
createdBy: false,
|
createdBy: false,
|
||||||
updatedBy: false,
|
updatedBy: false,
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
import Database, { Collection as DBCollection } from '@nocobase/database';
|
||||||
|
import Application from '@nocobase/server';
|
||||||
|
import { createApp } from '..';
|
||||||
|
|
||||||
|
describe('belongsTo', () => {
|
||||||
|
let db: Database;
|
||||||
|
let app: Application;
|
||||||
|
let Collection: DBCollection;
|
||||||
|
let Field: DBCollection;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
app = await createApp();
|
||||||
|
await app.db.sync();
|
||||||
|
db = app.db;
|
||||||
|
Collection = db.getCollection('collections');
|
||||||
|
Field = db.getCollection('fields');
|
||||||
|
await Collection.repository.create({
|
||||||
|
values: {
|
||||||
|
name: 'tests',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
await Collection.repository.create({
|
||||||
|
values: {
|
||||||
|
name: 'foos',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
await app.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('a', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,36 @@
|
|||||||
|
import Database, { Collection as DBCollection } from '@nocobase/database';
|
||||||
|
import Application from '@nocobase/server';
|
||||||
|
import { createApp } from '..';
|
||||||
|
|
||||||
|
describe('belongsToMany', () => {
|
||||||
|
let db: Database;
|
||||||
|
let app: Application;
|
||||||
|
let Collection: DBCollection;
|
||||||
|
let Field: DBCollection;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
app = await createApp();
|
||||||
|
await app.db.sync();
|
||||||
|
db = app.db;
|
||||||
|
Collection = db.getCollection('collections');
|
||||||
|
Field = db.getCollection('fields');
|
||||||
|
await Collection.repository.create({
|
||||||
|
values: {
|
||||||
|
name: 'tests',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
await Collection.repository.create({
|
||||||
|
values: {
|
||||||
|
name: 'foos',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
await app.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('a', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user