File tree 2 files changed +9
-7
lines changed
example-project/vue-app-broken
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ import { MyComponent, MyButton } from 'component-library-vue'
7
7
kidsNames =" John"
8
8
/>
9
9
<my-button fill =" ups" >Button</my-button >
10
+ <my-button router-link =" /" >Button</my-button >
10
11
</template >
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
8
8
9
9
describe ( 'type check' , ( ) => {
10
10
it ( 'should fail type check' , async ( ) => {
11
- const result = await new Promise ( ( resolve , rejects ) => {
11
+ const result = await new Promise < string > ( ( resolve , rejects ) => {
12
12
let stdout = ''
13
13
const child = cp . exec ( `npm run build.app` , {
14
14
cwd : path . resolve ( __dirname , '..' ) ,
@@ -24,11 +24,12 @@ describe('type check', () => {
24
24
} )
25
25
} ) ;
26
26
27
- expect ( result ) . toContain (
28
- `App.vue(7,5): error TS2322: Type 'string' is not assignable to type 'string[]'.`
29
- )
30
- expect ( result ) . toContain (
31
- `App.vue(9,14): error TS2322: Type '"ups"' is not assignable to type '"clear" | "outline" | "solid" | "default" | undefined'.`
32
- )
27
+ const typeErrors = result . split ( '\n' ) . filter ( ( line ) => line . startsWith ( 'src/App.vue' ) )
28
+ expect ( typeErrors ) . toMatchInlineSnapshot ( `
29
+ [
30
+ "src/App.vue(7,5): error TS2322: Type 'string' is not assignable to type 'string[]'.",
31
+ "src/App.vue(9,14): error TS2322: Type '"ups"' is not assignable to type '"clear" | "outline" | "solid" | "default" | undefined'.",
32
+ ]
33
+ ` )
33
34
} )
34
35
} )
You can’t perform that action at this time.
0 commit comments