File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,16 @@ jobs:
3535 node-version : ${{ matrix.node }}
3636
3737 - name : Install dependencies
38+ shell : bash
3839 run : npm ci
3940
4041 - name : Disable AppArmor
4142 if : ${{ matrix.os == 'ubuntu-latest' }}
43+ shell : bash
4244 run : echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
4345
4446 - name : Run tests
47+ shell : bash
4548 run : npm run test
4649
4750 # Gating job for branch protection.
Original file line number Diff line number Diff line change 1616 "docs:generate" : " node --experimental-strip-types scripts/generate-docs.ts" ,
1717 "start" : " npm run build && node build/src/index.js" ,
1818 "start-debug" : " DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/index.js" ,
19- "test" : " npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test ' build/tests/**/*.test.js' " ,
20- "test:only" : " npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test --test-only ' build/tests/**/*.test.js' " ,
21- "test:only:no-build" : " node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test --test-only ' build/tests/**/*.test.js' " ,
22- "test:update-snapshots" : " npm run build && node --require ./build/tests/setup.js --test-force-exit --test --test-update-snapshots ' build/tests/**/*.test.js' " ,
19+ "test" : " npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test \" build/tests/**/*.test.js\" " ,
20+ "test:only" : " npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test --test-only \" build/tests/**/*.test.js\" " ,
21+ "test:only:no-build" : " node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test --test-only \" build/tests/**/*.test.js\" " ,
22+ "test:update-snapshots" : " npm run build && node --require ./build/tests/setup.js --test-force-exit --test --test-update-snapshots \" build/tests/**/*.test.js\" " ,
2323 "prepare" : " node --experimental-strip-types scripts/prepare.ts"
2424 },
2525 "files" : [
Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66import { it } from 'node:test' ;
7+ import path from 'node:path' ;
78
89// This is run by Node when we execute the tests via the --require flag.
910it . snapshot . setResolveSnapshotPath ( testPath => {
1011 // By default the snapshots go into the build directory, but we want them
1112 // in the tests/ directory.
12- const correctPath = testPath ?. replace ( '/ build/ tests', '/ tests' ) ;
13+ const correctPath = testPath ?. replace ( path . join ( ' build' , ' tests') , 'tests' ) ;
1314 return correctPath + '.snapshot' ;
1415} ) ;
1516
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe('screenshot', () => {
6464 await withBrowser ( async ( response , context ) => {
6565 const page = context . getSelectedPage ( ) ;
6666 await page . setContent (
67- `<div style="color:blue;">test</div>` . repeat ( 5_000 ) ,
67+ `<div style="color:blue;">test</div>` . repeat ( 7_000 ) ,
6868 ) ;
6969 await screenshot . handler (
7070 { params : { format : 'png' , fullPage : true } } ,
You can’t perform that action at this time.
0 commit comments