@frontmcp/testing 1.9.1-rc.1 → 1.9.1-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/testing",
3
- "version": "1.9.1-rc.1",
3
+ "version": "1.9.1-rc.3",
4
4
  "description": "E2E testing framework for FrontMCP servers - MCP client, auth mocks, Playwright integration",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "homepage": "https://docs.agentfront.dev",
@@ -87,9 +87,9 @@
87
87
  "./esm": null
88
88
  },
89
89
  "peerDependencies": {
90
- "@frontmcp/lazy-zod": "1.9.1-rc.1",
91
- "@frontmcp/sdk": "1.9.1-rc.1",
92
- "@frontmcp/ui": "1.9.1-rc.1",
90
+ "@frontmcp/lazy-zod": "1.9.1-rc.3",
91
+ "@frontmcp/sdk": "1.9.1-rc.3",
92
+ "@frontmcp/ui": "1.9.1-rc.3",
93
93
  "@jest/globals": "^29.0.0 || ^30.0.0",
94
94
  "@playwright/test": "^1.40.0",
95
95
  "jest": "^29.0.0 || ^30.0.0"
@@ -112,8 +112,8 @@
112
112
  "node": ">=24.0.0"
113
113
  },
114
114
  "dependencies": {
115
- "@frontmcp/protocol": "1.9.1-rc.1",
116
- "@frontmcp/utils": "1.9.1-rc.1",
115
+ "@frontmcp/protocol": "1.9.1-rc.3",
116
+ "@frontmcp/utils": "1.9.1-rc.3",
117
117
  "@swc/core": "~1.15.41",
118
118
  "@swc/jest": "~0.2.38",
119
119
  "jose": "^6.0.11",
package/jest-preset.js CHANGED
@@ -2,10 +2,12 @@
2
2
  * @file jest-preset.js
3
3
  * @description Jest preset for @frontmcp/testing
4
4
  *
5
- * Usage in jest.config.ts or jest.e2e.config.ts:
5
+ * Mirrors the config `frontmcp test` injects (libs/cli/src/commands/dev/test.ts); a CLI test fails when they differ.
6
+ *
7
+ * Usage in jest.config.ts:
6
8
  * ```typescript
7
9
  * export default {
8
- * preset: '@frontmcp/testing/jest-preset',
10
+ * preset: '@frontmcp/testing',
9
11
  * // Your additional config...
10
12
  * };
11
13
  * ```
@@ -15,22 +17,23 @@ module.exports = {
15
17
  // Use Node.js environment for E2E tests
16
18
  testEnvironment: 'node',
17
19
 
18
- // Must cover `.js`/`.jsx` as well as `.ts`/`.tsx`: `transformIgnorePatterns`
19
- // only un-ignores a file and `testMatch` only discovers one — the transform
20
- // still has to match it. ESM-only deps ship `.js`, and testMatch accepts
21
- // `.e2e.spec.js(x)`, so a `.tsx?`-only rule would silently skip both.
20
+ // Covers `.js` too: ESM-only deps ship `.js`, and un-ignoring them in `transformIgnorePatterns` needs a matching transform.
22
21
  transform: {
23
22
  '^.+\\.[tj]sx?$': [
24
- 'ts-jest',
23
+ // The transform `frontmcp test` injects, resolved from here because @frontmcp/testing installs it
24
+ require.resolve('@swc/jest'),
25
25
  {
26
- useESM: false,
27
- tsconfig: {
28
- // Allow importing .js extensions for ESM compatibility
29
- moduleResolution: 'node',
30
- // Required to compile the `.js`/`.jsx` files the rule now matches.
31
- allowJs: true,
32
- jsx: 'react-jsx',
26
+ jsc: {
27
+ target: 'es2022',
28
+ parser: { syntax: 'typescript', tsx: true, decorators: true, dynamicImport: true },
29
+ transform: { decoratorMetadata: true, legacyDecorator: true, react: { runtime: 'automatic' } },
30
+ keepClassNames: true,
31
+ externalHelpers: false,
32
+ loose: true,
33
33
  },
34
+ module: { type: 'es6' },
35
+ sourceMaps: true,
36
+ swcrc: false,
34
37
  },
35
38
  ],
36
39
  },
@@ -38,28 +41,25 @@ module.exports = {
38
41
  // File extensions to consider
39
42
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
40
43
 
41
- // Default test timeout (30 seconds for E2E)
42
- testTimeout: 30000,
44
+ testTimeout: 60000,
43
45
 
44
46
  // Setup files that run after Jest is initialized
45
47
  // Path resolves to the compiled output when used from node_modules/@frontmcp/testing
46
48
  setupFilesAfterEnv: [require.resolve('@frontmcp/testing/setup')],
47
49
 
48
- // E2E specs, per the `.e2e.spec.ts(x)` convention the CLI's injected config
49
- // also enforces. The legacy `.e2e.ts` / `.test.ts` globs matched none of the
50
- // documented names, so projects on this preset silently ran zero E2E tests.
51
- testMatch: ['**/*.e2e.spec.ts', '**/*.e2e.spec.tsx', '**/*.e2e.spec.js', '**/*.e2e.spec.jsx'],
52
-
53
- // Module name mapping for path aliases
54
- // Note: These point to dist/ since the package exports declare dist/index.js
55
- moduleNameMapper: {
56
- // Map @frontmcp/testing to the installed package
57
- '^@frontmcp/testing$': '<rootDir>/node_modules/@frontmcp/testing/dist/index.js',
58
- '^@frontmcp/testing/(.*)$': '<rootDir>/node_modules/@frontmcp/testing/dist/$1',
59
- },
50
+ testMatch: [
51
+ '<rootDir>/src/**/*.spec.ts',
52
+ '<rootDir>/src/**/*.spec.tsx',
53
+ '<rootDir>/**/__tests__/**/*.spec.ts',
54
+ '<rootDir>/**/__tests__/**/*.spec.tsx',
55
+ '<rootDir>/e2e/**/*.e2e.spec.ts',
56
+ '<rootDir>/e2e/**/*.e2e.spec.tsx',
57
+ ],
60
58
 
61
- // Transpile ESM-only deps; the `.pnpm` skip keeps this correct under pnpm (issue #519).
62
- transformIgnorePatterns: ['node_modules[/\\\\](?!\\.pnpm[/\\\\])(?!(jose)[/\\\\])'],
59
+ // Transpile ESM-only deps (`@noble/*` for CodeCall); the `.pnpm` skip keeps this correct under pnpm (issue #519).
60
+ transformIgnorePatterns: [
61
+ 'node_modules[/\\\\](?!\\.pnpm[/\\\\])(?!(jose|@noble[/\\\\]hashes|@noble[/\\\\]ciphers)[/\\\\])',
62
+ ],
63
63
 
64
64
  // Ignore patterns
65
65
  testPathIgnorePatterns: ['/node_modules/', '/dist/'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/testing",
3
- "version": "1.9.1-rc.1",
3
+ "version": "1.9.1-rc.3",
4
4
  "description": "E2E testing framework for FrontMCP servers - MCP client, auth mocks, Playwright integration",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "homepage": "https://docs.agentfront.dev",
@@ -87,9 +87,9 @@
87
87
  "./esm": null
88
88
  },
89
89
  "peerDependencies": {
90
- "@frontmcp/lazy-zod": "1.9.1-rc.1",
91
- "@frontmcp/sdk": "1.9.1-rc.1",
92
- "@frontmcp/ui": "1.9.1-rc.1",
90
+ "@frontmcp/lazy-zod": "1.9.1-rc.3",
91
+ "@frontmcp/sdk": "1.9.1-rc.3",
92
+ "@frontmcp/ui": "1.9.1-rc.3",
93
93
  "@jest/globals": "^29.0.0 || ^30.0.0",
94
94
  "@playwright/test": "^1.40.0",
95
95
  "jest": "^29.0.0 || ^30.0.0"
@@ -112,8 +112,8 @@
112
112
  "node": ">=24.0.0"
113
113
  },
114
114
  "dependencies": {
115
- "@frontmcp/protocol": "1.9.1-rc.1",
116
- "@frontmcp/utils": "1.9.1-rc.1",
115
+ "@frontmcp/protocol": "1.9.1-rc.3",
116
+ "@frontmcp/utils": "1.9.1-rc.3",
117
117
  "@swc/core": "~1.15.41",
118
118
  "@swc/jest": "~0.2.38",
119
119
  "jose": "^6.0.11",
package/setup.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * Or use the preset:
16
16
  * ```typescript
17
17
  * export default {
18
- * preset: '@frontmcp/testing/jest-preset',
18
+ * preset: '@frontmcp/testing',
19
19
  * };
20
20
  * ```
21
21
  */
package/setup.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AASH,OAAO,0BAA0B,CAAC"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,0BAA0B,CAAC"}