Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"previewIcon": "node ./scripts/icon/index.js",
"api:gen": "tsc ./scripts/openapi/index.ts && node ./scripts/openapi/index.js && npx @redocly/cli build-docs ./scripts/openapi/openapi.json -o ./projects/app/public/openapi/index.html",
"create:i18n": "node ./scripts/i18n/index.js",
"test": "vitest run --exclude './projects/app/src/test/**'",
"test": "vitest run --exclude 'test/cases/spec'",
"test:all": "vitest run",
"test:workflow": "vitest run workflow"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { MongoApp } from '@fastgpt/service/core/app/schema';
import { MongoAppVersion } from '@fastgpt/service/core/app/version/schema';
import { getRootUser } from './datas/users';
import { Call } from './utils/request';
import { getRootUser } from '@test/datas/users';
import { Call } from '@test/utils/request';
import { describe, expect, it } from 'vitest';
import handler, {
type versionListBody,
type versionListResponse
} from '../projects/app/src/pages/api/core/app/version/list';
} from '@/pages/api/core/app/version/list';

describe('app version list test', () => {
it('should return app version list', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const testWorkflow = async (path: string) => {

it('Workflow test: simple workflow', async () => {
// create a simple app
await testWorkflow('projects/app/src/test/workflow/simple.json');
await testWorkflow('test/cases/workflow/simple.json');
});

it('Workflow test: output test', async () => {
console.log(await testWorkflow('projects/app/src/test/workflow/loopTest.json'));
console.log(await testWorkflow('test/cases/workflow/loopTest.json'));
});
2 changes: 1 addition & 1 deletion test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ beforeAll(async () => {
type: 'replSet',
serverOptions: {
replSet: {
count: 4
count: 1
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
},
outputFile: 'test-results.json',
setupFiles: ['./test/setup.ts'],
include: ['./test/test.ts', './projects/app/**/*.test.ts'],
include: ['./test/test.ts', './test/cases/**/*.test.ts'],
testTimeout: 5000
},
resolve: {
Expand Down
Loading