File tree Expand file tree Collapse file tree 4 files changed +198
-94
lines changed Expand file tree Collapse file tree 4 files changed +198
-94
lines changed Original file line number Diff line number Diff line change
1
+ name : Cypress
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ branches : [main]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ env :
13
+ NODE_ENV : test
14
+ SQLITE : db.db
15
+ strategy :
16
+ matrix :
17
+ node-version : [18.x, 20.x, 22.x]
18
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+ - name : Use Node.js ${{ matrix.node-version }}
22
+ uses : actions/setup-node@v4
23
+ with :
24
+ node-version : ${{ matrix.node-version }}
25
+ cache : " npm"
26
+ # Installs packages
27
+ - run : npm ci
28
+ # Tests the project
29
+ - run : npm test
Original file line number Diff line number Diff line change @@ -18,3 +18,15 @@ import "./commands";
18
18
19
19
// Alternatively you can use CommonJS syntax:
20
20
// require('./commands')
21
+
22
+ // Tests only work
23
+ beforeEach ( ( ) => {
24
+ cy . intercept (
25
+ {
26
+ url : / ^ ( (? ! \/ ( _ n e x t \/ d a t a | a p i ) ) .) * $ / , // Exclude URLs containing "/_next/data" or "/api"
27
+ } ,
28
+ ( req ) => {
29
+ req . headers [ "cache-control" ] = "no-cache" ;
30
+ } ,
31
+ ) . as ( "allRequests" ) ;
32
+ } ) ;
You can’t perform that action at this time.
0 commit comments