@google-cloud/synthetics-sdk-mocha 0.1.1 → 0.2.0
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 +4 -4
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Synthetics SDK Mocha
|
|
4
4
|
|
|
5
|
-
Note: This is an experimental package under active development. New releases may include breaking changes.
|
|
6
|
-
|
|
7
5
|
The Synthetics SDK Mocha is a framework that runs a provided mocha test suite, and returns a response that may be consumed by the Google Cloud Monitoring Synthetics.
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
9
|
+
Requires Node.js `^20.19.0 || >=22.12.0` (the same versions supported by mocha 12).
|
|
10
|
+
|
|
11
11
|
```
|
|
12
12
|
npm install --save @google-cloud/synthetics-sdk-mocha
|
|
13
13
|
```
|
|
@@ -62,7 +62,7 @@ it('pings my website', async () => {
|
|
|
62
62
|
|
|
63
63
|
Deploy function using gcloud
|
|
64
64
|
```bash
|
|
65
|
-
$ gcloud functions deploy <<service-name>> --gen2 --runtime=
|
|
65
|
+
$ gcloud functions deploy <<service-name>> --gen2 --runtime=nodejs22 --region=<<region>> --source=. --entry-point=SyntheticMochaSuite --trigger-http
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
The created function may now be used within the Google Cloud Monitoring Synthetics product, where you may set up periodic invocation of the function, who's output will result in metrics, logs, and alerts based off of the results of the test.
|
|
@@ -72,4 +72,4 @@ The created function may now be used within the Google Cloud Monitoring Syntheti
|
|
|
72
72
|
* For a sample, see [mocha-url-ok](../../samples/mocha-url-ok/)
|
|
73
73
|
* For more information on Mocha, visit [mochajs.org](https://mochajs.org/)
|
|
74
74
|
* For documentation regarding Google Cloud Monitoring Synthetics, visit [cloud.google.com/monitoring/](https://cloud.google.com/monitoring/)
|
|
75
|
-
* For documentation on Cloud Functions, visit [https://cloud.google.com/functions](https://cloud.google.com/functions/docs/concepts/version-comparison#new-in-2nd-gen)
|
|
75
|
+
* For documentation on Cloud Functions, visit [https://cloud.google.com/functions](https://cloud.google.com/functions/docs/concepts/version-comparison#new-in-2nd-gen)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/synthetics-sdk-mocha",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "NodeJS SDK for integrating with the Google Cloud Monitoring Synthetics product.",
|
|
5
5
|
"main": "./build/src/index.js",
|
|
6
6
|
"repository": "GoogleCloudPlatform/synthetics-sdk-nodejs",
|
|
@@ -34,9 +34,12 @@
|
|
|
34
34
|
"supertest": "^6.3.3",
|
|
35
35
|
"synthetics-sdk-mocha": "file:./"
|
|
36
36
|
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
39
|
+
},
|
|
37
40
|
"dependencies": {
|
|
38
41
|
"@google-cloud/synthetics-sdk-api": "^0.1.0",
|
|
39
42
|
"error-stack-parser": "^2.1.4",
|
|
40
|
-
"mocha": "^
|
|
43
|
+
"mocha": "^12.0.3"
|
|
41
44
|
}
|
|
42
45
|
}
|