Skip to content

Commit 99cb7ed

Browse files
committed
test: update test configurations and inputs
1 parent d344aee commit 99cb7ed

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.changeset/bumpy-mangos-change.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'create-mcp-kit': patch
3+
'@mcp-tool-kit/shared': patch
4+
---
5+
6+
test: update test configurations and inputs

packages/create-mcp-kit/tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('test index cli', () => {
88
test('should create project', async () => {
99
const testDir = join(tmpdir(), `test-cli-${Date.now()}`)
1010
mkdirSync(testDir, { recursive: true })
11-
const userInput = ['\x0D', '\x0D', '\x0D', '\x0D', 'y\x0D']
11+
const userInput = ['\x0D', '\x0D', '\x0D', '\x0D', '\x0D', 'y\x0D']
1212
const scriptPath = resolve('./packages/create-mcp-kit/src/index.ts')
1313
const subprocess = execa('c8', ['--reporter=lcov', '--reporter=text', 'tsx', scriptPath], {
1414
// stdio: ['pipe', 'inherit', 'inherit'],

packages/shared/tests/projectSetup.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ describe('test project setup file', () => {
99
const projectName = 'test'
1010
const testDir = join(tmpdir(), `test-shared-${Date.now()}`)
1111
mkdirSync(testDir, { recursive: true })
12-
const templatePath = join(__dirname, '../../create-mcp-kit/template', 'standard-ts')
13-
await createProject(testDir, templatePath, { projectName })
12+
const templatePath = join(__dirname, '../../create-mcp-kit/template', 'server-standard-ts')
13+
await createProject(testDir, templatePath, {
14+
projectName,
15+
year: new Date().getFullYear().toString(),
16+
transports: ['stdio'],
17+
plugins: [],
18+
components: [],
19+
})
1420
await installDependencies(testDir)
1521
rmSync(testDir, { recursive: true, force: true })
1622
}, 60000)

packages/shared/vitest.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { defineProject } from 'vitest/config'
22

33
export default defineProject({
4+
resolve: {
5+
alias: {
6+
'@': '/src',
7+
},
8+
},
49
test: {},
510
})

0 commit comments

Comments
 (0)