@serenity-js/rest 3.10.0 → 3.10.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/CHANGELOG.md +19 -0
- package/README.md +12 -9
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.10.2](https://github.com/serenity-js/serenity-js/compare/v3.10.1...v3.10.2) (2023-09-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** updated installation instruction in the README ([ec3f277](https://github.com/serenity-js/serenity-js/commit/ec3f2778334abbd7324497ceaa2df9f0560a103e)), closes [#1915](https://github.com/serenity-js/serenity-js/issues/1915)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.10.1](https://github.com/serenity-js/serenity-js/compare/v3.10.0...v3.10.1) (2023-09-01)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @serenity-js/rest
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.10.0](https://github.com/serenity-js/serenity-js/compare/v3.9.1...v3.10.0) (2023-08-23)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @serenity-js/rest
|
package/README.md
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
of complex software systems faster, more collaborative and easier to scale.
|
|
10
10
|
|
|
11
11
|
⭐️ Get started with Serenity/JS!
|
|
12
|
-
- [Serenity/JS
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
12
|
+
- [Serenity/JS web testing tutorial](https://serenity-js.org/handbook/web-testing/your-first-web-scenario)
|
|
13
|
+
- [Serenity/JS Handbook](https://serenity-js.org/handbook) and [Getting Started guides](https://serenity-js.org/handbook/getting-started/)
|
|
14
|
+
- [API documentation](https://serenity-js.org/api/core)
|
|
15
|
+
- [Serenity/JS Project Templates on GitHub](https://serenity-js.org/handbook/getting-started#serenityjs-project-templates)
|
|
15
16
|
|
|
16
17
|
👋 Join the Serenity/JS Community!
|
|
17
18
|
- Meet other Serenity/JS developers and maintainers on the [Serenity/JS Community chat channel](https://matrix.to/#/#serenity-js:gitter.im),
|
|
@@ -28,18 +29,20 @@ of complex software systems faster, more collaborative and easier to scale.
|
|
|
28
29
|
To install this module, as well as [`axios` HTTP client](https://github.com/axios/axios),
|
|
29
30
|
run the following command in your computer terminal:
|
|
30
31
|
|
|
31
|
-
```
|
|
32
|
-
npm install --save-dev @serenity-js/
|
|
32
|
+
```sh
|
|
33
|
+
npm install --save-dev @serenity-js/core @serenity-js/rest @serenity-js/assertions axios
|
|
33
34
|
```
|
|
34
35
|
|
|
36
|
+
To learn more about Serenity/JS and how to use it on your project, follow the [Serenity/JS Getting Started guide](https://serenity-js.org/handbook/getting-started/).
|
|
37
|
+
|
|
35
38
|
### Example test
|
|
36
39
|
|
|
37
40
|
```typescript
|
|
38
|
-
import { actorCalled } from '@serenity-js/core'
|
|
41
|
+
import { actorCalled } from '@serenity-js/core'
|
|
39
42
|
import { CallAnApi, DeleteRequest, GetRequest, LastResponse, PostRequest, Send } from '@serenity-js/rest'
|
|
40
|
-
import { Ensure, equals, startsWith } from '@serenity-js/assertions'
|
|
43
|
+
import { Ensure, equals, startsWith } from '@serenity-js/assertions'
|
|
41
44
|
|
|
42
|
-
const actor = actorCalled('Apisit').whoCan(CallAnApi.at('https://myapp.com/api'))
|
|
45
|
+
const actor = actorCalled('Apisit').whoCan(CallAnApi.at('https://myapp.com/api'))
|
|
43
46
|
|
|
44
47
|
await actor.attemptsTo(
|
|
45
48
|
// no users present in the system
|
|
@@ -58,7 +61,7 @@ await actor.attemptsTo(
|
|
|
58
61
|
// delete the test user account
|
|
59
62
|
Send.a(DeleteRequest.to(LastResponse.header('Location'))),
|
|
60
63
|
Ensure.that(LastResponse.status(), equals(200)),
|
|
61
|
-
)
|
|
64
|
+
)
|
|
62
65
|
```
|
|
63
66
|
|
|
64
67
|
## 📣 Stay up to date
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/rest",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.2",
|
|
4
4
|
"description": "Test REST APIs with Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"node": "^16.13 || ^18.12 || ^20"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@serenity-js/core": "3.10.
|
|
49
|
-
"axios": "^1.
|
|
48
|
+
"@serenity-js/core": "3.10.2",
|
|
49
|
+
"axios": "^1.5.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@integration/testing-tools": "3.0.0",
|
|
53
|
-
"@serenity-js/assertions": "3.10.
|
|
54
|
-
"@types/chai": "^4.3.
|
|
53
|
+
"@serenity-js/assertions": "3.10.2",
|
|
54
|
+
"@types/chai": "^4.3.6",
|
|
55
55
|
"@types/mocha": "^10.0.1",
|
|
56
56
|
"axios-mock-adapter": "1.21.5",
|
|
57
57
|
"c8": "8.0.1",
|
|
58
58
|
"mocha": "^10.2.0",
|
|
59
59
|
"mocha-multi": "^1.1.7",
|
|
60
60
|
"ts-node": "^10.9.1",
|
|
61
|
-
"typescript": "
|
|
61
|
+
"typescript": "5.1.6"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "6834827fffe5dd8dd3d2f39d2fea2c4039ab1d3d"
|
|
64
64
|
}
|