@hedia/test 2.1.0 → 2.1.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/README.md +2 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -37,6 +37,8 @@ The `addMock` method takes an object with the following properties:
|
|
|
37
37
|
- _method_ is an optional property that specifies the method of the request you want to mock. If it is not provided, the mock will match any method.
|
|
38
38
|
|
|
39
39
|
```javascript
|
|
40
|
+
import { FetchMocker } from "@hedia/test/fetchMocker";
|
|
41
|
+
|
|
40
42
|
it("should fetch data", async (testContext) => {
|
|
41
43
|
// When passing a TestContext to the FetchMocker constructor, the mock will be automatically removed after the test.
|
|
42
44
|
const fetchMocker = new FetchMocker(testContext)
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hedia/test",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "Tools for testing and reporting",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
+
"./fetchMocker": "./dist/src/fetchMocker.js",
|
|
7
8
|
"./reporters/sonarcloud": "./dist/src/reporters/sonarcloud.js",
|
|
8
9
|
"./reporters/test": "./dist/src/reporters/test.js"
|
|
9
10
|
},
|