File tree Expand file tree Collapse file tree 3 files changed +18
-16
lines changed
Expand file tree Collapse file tree 3 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 11{
22 "extends" : " ../tsconfig.json" ,
33 "compilerOptions" : {
4+ "baseUrl" : " ." ,
45 "paths" : {
5- "*" : [
6- " src/*" ,
7- " stories/*" ,
8- " typings/*"
9- ],
106 "or-sample" : [
11- " src/index.ts "
7+ " ../src "
128 ]
139 }
14- }
10+ },
11+ "include" : [
12+ " stories" ,
13+ " ../src"
14+ ],
15+ "exclude" : [
16+ " node_modules"
17+ ]
1518}
Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import React from 'react'
33
44import Sample from '../src'
55
6- describe ( 'src/index' , ( ) => {
7- function renderBtnFactory ( type ?: 'warning' | 'primary' ) {
8- const wrapper = mount ( < Sample type = { type } > test</ Sample > )
9- expect ( wrapper . find ( '.or-btn' ) . length ) . toBe ( 1 )
10- if ( type ) {
11- expect ( wrapper . find ( `.or-btn-${ type } ` ) . length ) . toBe ( 1 )
12- }
6+ function renderBtnFactory ( type ?: 'warning' | 'primary' ) {
7+ const wrapper = mount ( < Sample type = { type } > test</ Sample > )
8+ expect ( wrapper . find ( '.or-btn' ) . length ) . toBe ( 1 )
9+ if ( type ) {
10+ expect ( wrapper . find ( `.or-btn-${ type } ` ) . length ) . toBe ( 1 )
1311 }
12+ }
1413
14+ describe ( 'src/index' , ( ) => {
1515 it ( 'should render properly: no type' , ( ) => {
1616 renderBtnFactory ( )
1717 } )
Original file line number Diff line number Diff line change 2323 "exclude" : [
2424 " tests" ,
2525 " examples" ,
26- " node_modules" ,
27- " **/node_modules/*"
26+ " node_modules"
2827 ]
2928}
You can’t perform that action at this time.
0 commit comments