@frontmcp/testing 1.0.0-beta.1 → 1.0.0-beta.11
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/fixtures/index.mjs +16 -0
- package/esm/index.mjs +24 -10
- package/esm/package.json +6 -6
- package/fixtures/index.js +9 -0
- package/fixtures/test-fixture.d.ts.map +1 -1
- package/index.js +19 -12
- package/package.json +6 -6
package/esm/fixtures/index.mjs
CHANGED
|
@@ -5,6 +5,16 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
5
5
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
+
// libs/testing/src/fixtures/test-fixture.ts
|
|
9
|
+
import {
|
|
10
|
+
describe as _describe,
|
|
11
|
+
beforeAll as _beforeAll,
|
|
12
|
+
beforeEach as _beforeEach,
|
|
13
|
+
afterEach as _afterEach,
|
|
14
|
+
afterAll as _afterAll,
|
|
15
|
+
it as _it
|
|
16
|
+
} from "@jest/globals";
|
|
17
|
+
|
|
8
18
|
// libs/testing/src/platform/platform-client-info.ts
|
|
9
19
|
var MCP_APPS_EXTENSION_KEY = "io.modelcontextprotocol/ui";
|
|
10
20
|
function getPlatformClientInfo(platform) {
|
|
@@ -2925,6 +2935,12 @@ function findWorkspaceNodeModulesDir(startDir) {
|
|
|
2925
2935
|
}
|
|
2926
2936
|
|
|
2927
2937
|
// libs/testing/src/fixtures/test-fixture.ts
|
|
2938
|
+
var describe = _describe;
|
|
2939
|
+
var beforeAll = _beforeAll;
|
|
2940
|
+
var beforeEach = _beforeEach;
|
|
2941
|
+
var afterEach = _afterEach;
|
|
2942
|
+
var afterAll = _afterAll;
|
|
2943
|
+
var it = _it;
|
|
2928
2944
|
var currentConfig = {};
|
|
2929
2945
|
var serverInstance = null;
|
|
2930
2946
|
var tokenFactory = null;
|
package/esm/index.mjs
CHANGED
|
@@ -4707,6 +4707,20 @@ function hasMimeType(result, mimeType) {
|
|
|
4707
4707
|
}
|
|
4708
4708
|
|
|
4709
4709
|
// libs/testing/src/fixtures/test-fixture.ts
|
|
4710
|
+
import {
|
|
4711
|
+
describe as _describe,
|
|
4712
|
+
beforeAll as _beforeAll,
|
|
4713
|
+
beforeEach as _beforeEach,
|
|
4714
|
+
afterEach as _afterEach,
|
|
4715
|
+
afterAll as _afterAll,
|
|
4716
|
+
it as _it
|
|
4717
|
+
} from "@jest/globals";
|
|
4718
|
+
var describe2 = _describe;
|
|
4719
|
+
var beforeAll2 = _beforeAll;
|
|
4720
|
+
var beforeEach2 = _beforeEach;
|
|
4721
|
+
var afterEach2 = _afterEach;
|
|
4722
|
+
var afterAll2 = _afterAll;
|
|
4723
|
+
var it2 = _it;
|
|
4710
4724
|
var currentConfig = {};
|
|
4711
4725
|
var serverInstance = null;
|
|
4712
4726
|
var tokenFactory = null;
|
|
@@ -4878,7 +4892,7 @@ function resolveServerCommand(server) {
|
|
|
4878
4892
|
return `npx tsx ${server}`;
|
|
4879
4893
|
}
|
|
4880
4894
|
function testWithFixtures(name, fn) {
|
|
4881
|
-
|
|
4895
|
+
it2(name, async () => {
|
|
4882
4896
|
const fixtures = await createTestFixtures();
|
|
4883
4897
|
let testFailed = false;
|
|
4884
4898
|
try {
|
|
@@ -4893,12 +4907,12 @@ function testWithFixtures(name, fn) {
|
|
|
4893
4907
|
}
|
|
4894
4908
|
function use(config) {
|
|
4895
4909
|
currentConfig = { ...currentConfig, ...config };
|
|
4896
|
-
|
|
4910
|
+
afterAll2(async () => {
|
|
4897
4911
|
await cleanupSharedResources();
|
|
4898
4912
|
});
|
|
4899
4913
|
}
|
|
4900
4914
|
function skip(name, fn) {
|
|
4901
|
-
|
|
4915
|
+
it2.skip(name, async () => {
|
|
4902
4916
|
const fixtures = await createTestFixtures();
|
|
4903
4917
|
let testFailed = false;
|
|
4904
4918
|
try {
|
|
@@ -4912,7 +4926,7 @@ function skip(name, fn) {
|
|
|
4912
4926
|
});
|
|
4913
4927
|
}
|
|
4914
4928
|
function only(name, fn) {
|
|
4915
|
-
|
|
4929
|
+
it2.only(name, async () => {
|
|
4916
4930
|
const fixtures = await createTestFixtures();
|
|
4917
4931
|
let testFailed = false;
|
|
4918
4932
|
try {
|
|
@@ -4926,15 +4940,15 @@ function only(name, fn) {
|
|
|
4926
4940
|
});
|
|
4927
4941
|
}
|
|
4928
4942
|
function todo(name) {
|
|
4929
|
-
|
|
4943
|
+
it2.todo(name);
|
|
4930
4944
|
}
|
|
4931
4945
|
var test = testWithFixtures;
|
|
4932
4946
|
test.use = use;
|
|
4933
|
-
test.describe =
|
|
4934
|
-
test.beforeAll =
|
|
4935
|
-
test.beforeEach =
|
|
4936
|
-
test.afterEach =
|
|
4937
|
-
test.afterAll =
|
|
4947
|
+
test.describe = describe2;
|
|
4948
|
+
test.beforeAll = beforeAll2;
|
|
4949
|
+
test.beforeEach = beforeEach2;
|
|
4950
|
+
test.afterEach = afterEach2;
|
|
4951
|
+
test.afterAll = afterAll2;
|
|
4938
4952
|
test.skip = skip;
|
|
4939
4953
|
test.only = only;
|
|
4940
4954
|
test.todo = todo;
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/testing",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.11",
|
|
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,8 +87,8 @@
|
|
|
87
87
|
"./esm": null
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@frontmcp/sdk": "1.0.0-beta.
|
|
91
|
-
"@frontmcp/ui": "1.0.0-beta.
|
|
90
|
+
"@frontmcp/sdk": "1.0.0-beta.11",
|
|
91
|
+
"@frontmcp/ui": "1.0.0-beta.11",
|
|
92
92
|
"@playwright/test": "^1.40.0",
|
|
93
93
|
"jest": "^29.0.0",
|
|
94
94
|
"@jest/globals": "^29.0.0"
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"engines": {
|
|
111
|
-
"node": ">=
|
|
111
|
+
"node": ">=24.0.0"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@frontmcp/utils": "1.0.0-beta.
|
|
115
|
-
"@frontmcp/protocol": "1.0.0-beta.
|
|
114
|
+
"@frontmcp/utils": "1.0.0-beta.11",
|
|
115
|
+
"@frontmcp/protocol": "1.0.0-beta.11",
|
|
116
116
|
"jose": "^6.0.11",
|
|
117
117
|
"tslib": "^2.3.0"
|
|
118
118
|
},
|
package/fixtures/index.js
CHANGED
|
@@ -28,6 +28,9 @@ __export(fixtures_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(fixtures_exports);
|
|
30
30
|
|
|
31
|
+
// libs/testing/src/fixtures/test-fixture.ts
|
|
32
|
+
var import_globals = require("@jest/globals");
|
|
33
|
+
|
|
31
34
|
// libs/testing/src/platform/platform-client-info.ts
|
|
32
35
|
var MCP_APPS_EXTENSION_KEY = "io.modelcontextprotocol/ui";
|
|
33
36
|
function getPlatformClientInfo(platform) {
|
|
@@ -2948,6 +2951,12 @@ function findWorkspaceNodeModulesDir(startDir) {
|
|
|
2948
2951
|
}
|
|
2949
2952
|
|
|
2950
2953
|
// libs/testing/src/fixtures/test-fixture.ts
|
|
2954
|
+
var describe = import_globals.describe;
|
|
2955
|
+
var beforeAll = import_globals.beforeAll;
|
|
2956
|
+
var beforeEach = import_globals.beforeEach;
|
|
2957
|
+
var afterEach = import_globals.afterEach;
|
|
2958
|
+
var afterAll = import_globals.afterAll;
|
|
2959
|
+
var it = import_globals.it;
|
|
2951
2960
|
var currentConfig = {};
|
|
2952
2961
|
var serverInstance = null;
|
|
2953
2962
|
var tokenFactory = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-fixture.d.ts","sourceRoot":"","sources":["../../src/fixtures/test-fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"test-fixture.d.ts","sourceRoot":"","sources":["../../src/fixtures/test-fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAwBH,OAAO,KAAK,EAEV,YAAY,EAIZ,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AAsBzB;;GAEG;AACH,iBAAe,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqDxD;AAED;;GAEG;AACH,iBAAe,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CA6BzD;AAED;;;;GAIG;AACH,iBAAe,mBAAmB,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB5F;AAED;;GAEG;AACH,iBAAe,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAQrD;AAmMD,QAAA,MAAM,IAAI,EAAuB,gBAAgB,CAAC;AAqBlD,OAAO,EAAE,IAAI,EAAE,CAAC;AAGhB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,CAAC"}
|
package/index.js
CHANGED
|
@@ -4825,6 +4825,13 @@ function hasMimeType(result, mimeType) {
|
|
|
4825
4825
|
}
|
|
4826
4826
|
|
|
4827
4827
|
// libs/testing/src/fixtures/test-fixture.ts
|
|
4828
|
+
var import_globals = require("@jest/globals");
|
|
4829
|
+
var describe2 = import_globals.describe;
|
|
4830
|
+
var beforeAll2 = import_globals.beforeAll;
|
|
4831
|
+
var beforeEach2 = import_globals.beforeEach;
|
|
4832
|
+
var afterEach2 = import_globals.afterEach;
|
|
4833
|
+
var afterAll2 = import_globals.afterAll;
|
|
4834
|
+
var it2 = import_globals.it;
|
|
4828
4835
|
var currentConfig = {};
|
|
4829
4836
|
var serverInstance = null;
|
|
4830
4837
|
var tokenFactory = null;
|
|
@@ -4996,7 +5003,7 @@ function resolveServerCommand(server) {
|
|
|
4996
5003
|
return `npx tsx ${server}`;
|
|
4997
5004
|
}
|
|
4998
5005
|
function testWithFixtures(name, fn) {
|
|
4999
|
-
|
|
5006
|
+
it2(name, async () => {
|
|
5000
5007
|
const fixtures = await createTestFixtures();
|
|
5001
5008
|
let testFailed = false;
|
|
5002
5009
|
try {
|
|
@@ -5011,12 +5018,12 @@ function testWithFixtures(name, fn) {
|
|
|
5011
5018
|
}
|
|
5012
5019
|
function use(config) {
|
|
5013
5020
|
currentConfig = { ...currentConfig, ...config };
|
|
5014
|
-
|
|
5021
|
+
afterAll2(async () => {
|
|
5015
5022
|
await cleanupSharedResources();
|
|
5016
5023
|
});
|
|
5017
5024
|
}
|
|
5018
5025
|
function skip(name, fn) {
|
|
5019
|
-
|
|
5026
|
+
it2.skip(name, async () => {
|
|
5020
5027
|
const fixtures = await createTestFixtures();
|
|
5021
5028
|
let testFailed = false;
|
|
5022
5029
|
try {
|
|
@@ -5030,7 +5037,7 @@ function skip(name, fn) {
|
|
|
5030
5037
|
});
|
|
5031
5038
|
}
|
|
5032
5039
|
function only(name, fn) {
|
|
5033
|
-
|
|
5040
|
+
it2.only(name, async () => {
|
|
5034
5041
|
const fixtures = await createTestFixtures();
|
|
5035
5042
|
let testFailed = false;
|
|
5036
5043
|
try {
|
|
@@ -5044,22 +5051,22 @@ function only(name, fn) {
|
|
|
5044
5051
|
});
|
|
5045
5052
|
}
|
|
5046
5053
|
function todo(name) {
|
|
5047
|
-
|
|
5054
|
+
it2.todo(name);
|
|
5048
5055
|
}
|
|
5049
5056
|
var test = testWithFixtures;
|
|
5050
5057
|
test.use = use;
|
|
5051
|
-
test.describe =
|
|
5052
|
-
test.beforeAll =
|
|
5053
|
-
test.beforeEach =
|
|
5054
|
-
test.afterEach =
|
|
5055
|
-
test.afterAll =
|
|
5058
|
+
test.describe = describe2;
|
|
5059
|
+
test.beforeAll = beforeAll2;
|
|
5060
|
+
test.beforeEach = beforeEach2;
|
|
5061
|
+
test.afterEach = afterEach2;
|
|
5062
|
+
test.afterAll = afterAll2;
|
|
5056
5063
|
test.skip = skip;
|
|
5057
5064
|
test.only = only;
|
|
5058
5065
|
test.todo = todo;
|
|
5059
5066
|
|
|
5060
5067
|
// libs/testing/src/expect.ts
|
|
5061
|
-
var
|
|
5062
|
-
var expect =
|
|
5068
|
+
var import_globals2 = require("@jest/globals");
|
|
5069
|
+
var expect = import_globals2.expect;
|
|
5063
5070
|
|
|
5064
5071
|
// libs/testing/src/platform/platform-types.ts
|
|
5065
5072
|
function getPlatformMetaNamespace(platform) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/testing",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.11",
|
|
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,8 +87,8 @@
|
|
|
87
87
|
"./esm": null
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@frontmcp/sdk": "1.0.0-beta.
|
|
91
|
-
"@frontmcp/ui": "1.0.0-beta.
|
|
90
|
+
"@frontmcp/sdk": "1.0.0-beta.11",
|
|
91
|
+
"@frontmcp/ui": "1.0.0-beta.11",
|
|
92
92
|
"@playwright/test": "^1.40.0",
|
|
93
93
|
"jest": "^29.0.0",
|
|
94
94
|
"@jest/globals": "^29.0.0"
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"engines": {
|
|
111
|
-
"node": ">=
|
|
111
|
+
"node": ">=24.0.0"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@frontmcp/utils": "1.0.0-beta.
|
|
115
|
-
"@frontmcp/protocol": "1.0.0-beta.
|
|
114
|
+
"@frontmcp/utils": "1.0.0-beta.11",
|
|
115
|
+
"@frontmcp/protocol": "1.0.0-beta.11",
|
|
116
116
|
"jose": "^6.0.11",
|
|
117
117
|
"tslib": "^2.3.0"
|
|
118
118
|
},
|