@kubb/plugin-cypress 5.3.0 → 5.3.2
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/index.cjs +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/docs/overview.md +5 -3
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -531,7 +531,7 @@ var compatibility = {
|
|
|
531
531
|
"node": ">=22.22"
|
|
532
532
|
};
|
|
533
533
|
// package.json
|
|
534
|
-
var version = "5.3.
|
|
534
|
+
var version = "5.3.2";
|
|
535
535
|
// src/resolvers/resolverCypress.ts
|
|
536
536
|
/**
|
|
537
537
|
* Default resolver used by `@kubb/plugin-cypress`. Decides the names and file
|
package/dist/index.d.cts
CHANGED
|
@@ -118,5 +118,4 @@ export declare const pluginCypress: import("@kubb/kit").PluginFactory<PluginCypr
|
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
|
120
120
|
export declare const resolverCypress: import("@kubb/kit").Resolver;
|
|
121
|
-
export { type PluginCypress, type ResolverCypress, pluginCypress as default };
|
|
122
|
-
//# sourceMappingURL=index.d.cts.map
|
|
121
|
+
export { type PluginCypress, type ResolverCypress, pluginCypress as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -118,5 +118,4 @@ export declare const pluginCypress: import("@kubb/kit").PluginFactory<PluginCypr
|
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
|
120
120
|
export declare const resolverCypress: import("@kubb/kit").Resolver;
|
|
121
|
-
export { type PluginCypress, type ResolverCypress, pluginCypress as default };
|
|
122
|
-
//# sourceMappingURL=index.d.ts.map
|
|
121
|
+
export { type PluginCypress, type ResolverCypress, pluginCypress as default };
|
package/dist/index.js
CHANGED
|
@@ -527,7 +527,7 @@ var compatibility = {
|
|
|
527
527
|
"node": ">=22.22"
|
|
528
528
|
};
|
|
529
529
|
// package.json
|
|
530
|
-
var version = "5.3.
|
|
530
|
+
var version = "5.3.2";
|
|
531
531
|
// src/resolvers/resolverCypress.ts
|
|
532
532
|
/**
|
|
533
533
|
* Default resolver used by `@kubb/plugin-cypress`. Decides the names and file
|
package/docs/overview.md
CHANGED
|
@@ -18,16 +18,18 @@ See [Options](https://kubb.dev/extensions/kubb-labs/plugin-cypress/options) for
|
|
|
18
18
|
|
|
19
19
|
## Example
|
|
20
20
|
|
|
21
|
-
The config below writes the helpers to `src/gen/cypress`.
|
|
21
|
+
The config below writes the helpers to `src/gen/cypress`. The Petstore spec declares JSON and XML for most responses, so `contentType` keeps the JSON one. Without it, a response body is typed as `Pet | string`.
|
|
22
22
|
|
|
23
23
|
```typescript [kubb.config.ts]
|
|
24
24
|
import { defineConfig } from 'kubb/config'
|
|
25
|
+
import { adapterOas } from '@kubb/adapter-oas'
|
|
25
26
|
import { pluginTs } from '@kubb/plugin-ts'
|
|
26
27
|
import { pluginCypress } from '@kubb/plugin-cypress'
|
|
27
28
|
|
|
28
29
|
export default defineConfig({
|
|
29
30
|
input: './petStore.yaml',
|
|
30
31
|
output: { path: './src/gen' },
|
|
32
|
+
adapter: adapterOas({ contentType: 'application/json', integerType: 'number' }),
|
|
31
33
|
plugins: [
|
|
32
34
|
pluginTs(),
|
|
33
35
|
pluginCypress({ output: { path: 'cypress', mode: 'directory' } }),
|
|
@@ -35,14 +37,14 @@ export default defineConfig({
|
|
|
35
37
|
})
|
|
36
38
|
```
|
|
37
39
|
|
|
38
|
-
A test then calls a helper and gets a typed response body. `petId` is an `int64`, which
|
|
40
|
+
A test then calls a helper and gets a typed response body. `petId` is an `int64`, which `integerType: 'number'` types as `number` instead of the default `bigint`.
|
|
39
41
|
|
|
40
42
|
```typescript [cypress/e2e/pet.cy.ts]
|
|
41
43
|
import { getPetById } from '../../src/gen/cypress/getPetById'
|
|
42
44
|
|
|
43
45
|
describe('Pet API', () => {
|
|
44
46
|
it('returns the pet by id', () => {
|
|
45
|
-
getPetById({ path: { petId:
|
|
47
|
+
getPetById({ path: { petId: 1 } }).then((pet) => {
|
|
46
48
|
expect(pet.name).to.be.a('string')
|
|
47
49
|
})
|
|
48
50
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-cypress",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Generate Cypress request commands and e2e test fixtures with Kubb for automated API testing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-generation",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"registry": "https://registry.npmjs.org/"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@kubb/kit": "^5.
|
|
72
|
-
"@kubb/plugin-ts": "^5.5.
|
|
73
|
-
"@kubb/renderer-jsx": "^5.
|
|
71
|
+
"@kubb/kit": "^5.19.0",
|
|
72
|
+
"@kubb/plugin-ts": "^5.5.2",
|
|
73
|
+
"@kubb/renderer-jsx": "^5.19.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@internals/shared": "0.0.0",
|