mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-18 10:03:55 +00:00

* feat: team permission refine (#4402) * chore: team permission extend * feat: manage team permission * chore: api auth * fix: i18n * feat: add initv493 * fix: test, org auth manager * test: app test for refined permission * update init sh * fix: add/remove manage permission (#4427) * fix: add/remove manage permission * fix: github action fastgpt-test * fix: mock create model * fix: team write permission * fix: ts * account permission --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
19 lines
470 B
TypeScript
19 lines
470 B
TypeScript
import { MongoMemoryReplSet } from 'mongodb-memory-server';
|
|
import type { TestProject } from 'vitest/node';
|
|
|
|
export default async function setup(project: TestProject) {
|
|
const replset = await MongoMemoryReplSet.create({ replSet: { count: 1 } });
|
|
const uri = replset.getUri();
|
|
project.provide('MONGODB_URI', uri);
|
|
|
|
return async () => {
|
|
await replset.stop();
|
|
};
|
|
}
|
|
|
|
declare module 'vitest' {
|
|
export interface ProvidedContext {
|
|
MONGODB_URI: string;
|
|
}
|
|
}
|