-
Notifications
You must be signed in to change notification settings - Fork 39
/
netlify.toml
42 lines (36 loc) · 1.29 KB
/
netlify.toml
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
34
35
36
37
38
39
40
41
42
[build]
command = "npm run build"
publish = "build"
base = "tests/routing"
[build.environment]
# cache Cypress binary in local "node_modules" folder
# so Netlify caches it
CYPRESS_CACHE_FOLDER = "./node_modules/CypressBinary"
# set TERM variable for terminal output
TERM = "xterm"
# do not print too many progress messages
CI = "1"
[[plugins]]
# local Cypress plugin will test our site after it is built
# in production, please use: package = "netlify-plugin-cypress"
package = "../../"
# run Cypress tests once on the site before it is built
# and then after building the static folder
[plugins.inputs]
# these settings apply to the default step onSuccess
# in this case, we do not want to run any tests after deploy
enable = false
# let's run tests against development server
# before building it (and testing the built site)
[plugins.inputs.preBuild]
enable = true
start = 'npm start'
wait-on = 'http://localhost:3000'
wait-on-timeout = '45' # seconds
# and test the built site after
[plugins.inputs.postBuild]
enable = true
# must allow our test server to redirect unknown routes to "/"
# so that client-side routing can correctly route them
# can be set to true or "index.html" (or similar fallback filename in the built folder)
spa = true