@@ -5,7 +5,6 @@ describe("usage", () => {
55 describe ( "default export" , ( ) => {
66 test ( "custom rules on default export" , ( ) => {
77 const rules = githubMarkdownLint ;
8- console . log ( rules ) ;
98 expect ( rules ) . toHaveLength ( 3 ) ;
109
1110 expect ( rules [ 0 ] . names ) . toEqual ( [ "GH001" , "no-default-alt-text" ] ) ;
@@ -14,8 +13,8 @@ describe("usage", () => {
1413 } ) ;
1514 } ) ;
1615 describe ( "init method" , ( ) => {
17- test ( "default options returned with no arguments provided" , ( ) => {
18- const options = init ( ) ;
16+ test ( "default options returned with no arguments provided" , async ( ) => {
17+ const options = await init ( ) ;
1918 expect ( options ) . toEqual ( {
2019 "no-duplicate-heading" : true ,
2120 "ol-prefix" : "ordered" ,
@@ -38,8 +37,8 @@ describe("usage", () => {
3837 } ) ;
3938 } ) ;
4039
41- test ( "arguments override default configuration" , ( ) => {
42- const defaultOptions = init ( ) ;
40+ test ( "arguments override default configuration" , async ( ) => {
41+ const defaultOptions = await init ( ) ;
4342
4443 const toTestOptions = Object . keys ( defaultOptions ) . slice ( 0 , 3 ) ;
4544
@@ -54,20 +53,20 @@ describe("usage", () => {
5453 expect ( originalConfig ) . not . toEqual ( consumerConfig ) ;
5554
5655 // do config step
57- const options = init ( consumerConfig ) ;
56+ const options = await init ( consumerConfig ) ;
5857
5958 // confirm config is set by consumer
6059 expect ( options ) . toHaveProperty (
6160 toTestOptions [ 0 ] ,
62- consumerConfig [ toTestOptions [ 0 ] ]
61+ consumerConfig [ toTestOptions [ 0 ] ] ,
6362 ) ;
6463 expect ( options ) . toHaveProperty (
6564 toTestOptions [ 1 ] ,
66- consumerConfig [ toTestOptions [ 1 ] ]
65+ consumerConfig [ toTestOptions [ 1 ] ] ,
6766 ) ;
6867 expect ( options ) . toHaveProperty (
6968 toTestOptions [ 2 ] ,
70- consumerConfig [ toTestOptions [ 2 ] ]
69+ consumerConfig [ toTestOptions [ 2 ] ] ,
7170 ) ;
7271 } ) ;
7372 } ) ;
0 commit comments