@schmock/core 2.0.0 → 2.0.1
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/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +3 -0
- package/dist/interceptor.d.ts.map +1 -1
- package/dist/interceptor.js +26 -9
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/builder.ts +3 -0
- package/src/helpers.test.ts +41 -0
- package/src/interceptor.test.ts +131 -0
- package/src/interceptor.ts +29 -9
- package/src/parser.property.test.ts +101 -0
- package/src/response-parsing.test.ts +74 -0
- package/src/server.test.ts +49 -0
- package/src/steps/async-support.steps.ts +0 -35
- package/src/steps/basic-usage.steps.ts +0 -84
- package/src/steps/developer-experience.steps.ts +0 -269
- package/src/steps/error-handling.steps.ts +0 -66
- package/src/steps/http-methods.steps.ts +0 -66
- package/src/steps/request-history.steps.ts +0 -75
- package/src/steps/route-key-format.steps.ts +0 -19
- package/src/types.ts +1 -0
|
@@ -78,25 +78,6 @@ describeFeature(feature, ({ Scenario, ScenarioOutline }) => {
|
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
Scenario("Path with query string placeholder", ({ When, Then, And }) => {
|
|
82
|
-
When("I parse route key {string}", (_, routeKey: string) => {
|
|
83
|
-
result = parseRouteKey(routeKey);
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
Then("the method should be {string}", (_, expectedMethod: string) => {
|
|
87
|
-
expect(result.method).toBe(expectedMethod);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
And("the path should be {string}", (_, expectedPath: string) => {
|
|
91
|
-
expect(result.path).toBe(expectedPath);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
And("query parameters are handled separately at runtime", () => {
|
|
95
|
-
// This is a documentation scenario - query params are not part of the route key
|
|
96
|
-
expect(result.path).not.toContain("?");
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
81
|
Scenario("Complex nested paths", ({ When, Then, And }) => {
|
|
101
82
|
When("I parse route key {string}", (_, routeKey: string) => {
|
|
102
83
|
result = parseRouteKey(routeKey);
|
package/src/types.ts
CHANGED
|
@@ -33,3 +33,4 @@ export type AdapterRequest = Schmock.AdapterRequest;
|
|
|
33
33
|
export type AdapterResponse = Schmock.AdapterResponse;
|
|
34
34
|
export type InterceptOptions = Schmock.InterceptOptions;
|
|
35
35
|
export type InterceptHandle = Schmock.InterceptHandle;
|
|
36
|
+
export type AdapterRequestOverride = Schmock.AdapterRequestOverride;
|