-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathhome.check.js
More file actions
33 lines (29 loc) · 1.07 KB
/
home.check.js
File metadata and controls
33 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const path = require('path');
const { BrowserCheck } = require('checkly/constructs');
const { smsChannel, emailChannel } = require('../alert-channels');
const { websiteGroup } = require('./website-group.check');
const alertChannels = [smsChannel, emailChannel];
/*
* In this example, we bundle all basic checks needed to check the Checkly homepage. We explicitly define the Browser
* check here, instead of using a default based on a .spec.js file. This allows us to override the check configuration.
* We can also add more checks into one file, in this case to cover a specific API call needed to hydrate the homepage.
*/
// We can define multiple checks in a single *.check.js file.
new BrowserCheck('homepage-browser-check', {
name: 'Home page',
alertChannels,
group: websiteGroup,
code: {
entrypoint: path.join(__dirname, 'homepage.spec.js'),
},
runParallel: true,
});
new BrowserCheck('login-browser-check', {
name: 'Login Check',
alertChannels,
group: websiteGroup,
code: {
entrypoint: path.join(__dirname, 'login.spec.js'),
},
runParallel: true,
});