File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
- import { expect } from "vitest" ;
2
1
import { getStoryContext , TestRunnerConfig , waitForPageReady } from '@storybook/test-runner' ;
3
2
import { toMatchImageSnapshot } from 'jest-image-snapshot' ;
4
3
4
+
5
5
const config : TestRunnerConfig = {
6
6
setup ( ) {
7
+ // @ts -ignore
7
8
expect . extend ( { toMatchImageSnapshot } ) ;
8
9
} ,
9
10
async preVisit ( page , context ) {
@@ -49,6 +50,7 @@ const config: TestRunnerConfig = {
49
50
await page . evaluate ( ( ) => document . fonts . ready ) ;
50
51
51
52
const image = await page . screenshot ( { animations : 'disabled' , scale : 'css' } ) ;
53
+ // @ts -ignore
52
54
expect ( image ) . toMatchImageSnapshot ( {
53
55
customSnapshotsDir,
54
56
customDiffDir,
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ const reactHmrWorkaround = {
65
65
const splunkPathRewriter = {
66
66
name : 'splunk-path-rewriter' ,
67
67
configureServer ( server ) {
68
+ // eslint-disable-next-line consistent-return
68
69
server . middlewares . use ( ( req , _res , next ) => {
69
70
if ( ! req . url ) {
70
71
return next ( ) ;
@@ -148,6 +149,7 @@ export default defineConfig(({ mode }) => {
148
149
proxyTargetUrl ,
149
150
devServerUrl
150
151
) ;
152
+ // eslint-disable-next-line no-param-reassign
151
153
proxyRes . headers . location = newLocation ;
152
154
}
153
155
} ) ;
You can’t perform that action at this time.
0 commit comments