File tree Expand file tree Collapse file tree 4 files changed +23
-19
lines changed
Expand file tree Collapse file tree 4 files changed +23
-19
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,6 +2,22 @@ import type { SyncExpectationResult } from '@vitest/expect';
22import { expect } from 'vitest' ;
33import { osAgnosticPath } from '@code-pushup/test-utils' ;
44
5+ export type CustomPathMatchers = {
6+ toMatchPath : ( path : string ) => void ;
7+ toStartWithPath : ( path : string ) => void ;
8+ toContainPath : ( path : string ) => void ;
9+ toEndWithPath : ( path : string ) => void ;
10+ } ;
11+
12+ export type CustomAsymmetricPathMatchers = {
13+ /* eslint-disable @typescript-eslint/no-explicit-any */
14+ pathToMatch : ( path : string ) => any ;
15+ pathToStartWith : ( path : string ) => any ;
16+ pathToContain : ( path : string ) => any ;
17+ pathToEndWith : ( path : string ) => any ;
18+ /* eslint-enable @typescript-eslint/no-explicit-any */
19+ } ;
20+
521expect . extend ( {
622 toMatchPath ( actual : string , expected : string ) : SyncExpectationResult {
723 const normalizedReceived = osAgnosticPath ( actual ) ;
Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/consistent-type-definitions,@typescript-eslint/no-empty-interface */
12import type {
23 CustomAsymmetricPathMatchers ,
34 CustomPathMatchers ,
4- } from './lib/extend/path.matcher' ;
5+ } from './lib/extend/path.matcher.js ' ;
56
67declare module 'vitest' {
7- type Assertion < T = unknown > = CustomPathMatchers < T > ;
8- type AsymmetricMatchersContaining = CustomAsymmetricPathMatchers < T > ;
8+ interface Assertion extends CustomPathMatchers { }
9+ interface AsymmetricMatchersContaining extends CustomAsymmetricPathMatchers { }
910}
Original file line number Diff line number Diff line change 1414 "references" : [
1515 {
1616 "path" : " ./tsconfig.lib.json"
17+ },
18+ {
19+ "path" : " ./tsconfig.test.json"
1720 }
1821 ]
1922}
You can’t perform that action at this time.
0 commit comments