@@ -58,6 +58,7 @@ test('respects cwd option', async t => {
5858 const cwd = await git . bootstrap ( 'fixtures/recursive-extends/first-extended' ) ;
5959 const actual = await load ( { } , { cwd} ) ;
6060 t . deepEqual ( actual , {
61+ formatter : '@commitlint/format' ,
6162 extends : [ './second-extended' ] ,
6263 rules : {
6364 one : 1 ,
@@ -70,6 +71,7 @@ test('recursive extends', async t => {
7071 const cwd = await git . bootstrap ( 'fixtures/recursive-extends' ) ;
7172 const actual = await load ( { } , { cwd} ) ;
7273 t . deepEqual ( actual , {
74+ formatter : '@commitlint/format' ,
7375 extends : [ './first-extended' ] ,
7476 rules : {
7577 zero : 0 ,
@@ -84,6 +86,7 @@ test('recursive extends with json file', async t => {
8486 const actual = await load ( { } , { cwd} ) ;
8587
8688 t . deepEqual ( actual , {
89+ formatter : '@commitlint/format' ,
8790 extends : [ './first-extended' ] ,
8891 rules : {
8992 zero : 0 ,
@@ -98,6 +101,7 @@ test('recursive extends with yaml file', async t => {
98101 const actual = await load ( { } , { cwd} ) ;
99102
100103 t . deepEqual ( actual , {
104+ formatter : '@commitlint/format' ,
101105 extends : [ './first-extended' ] ,
102106 rules : {
103107 zero : 0 ,
@@ -112,6 +116,7 @@ test('recursive extends with js file', async t => {
112116 const actual = await load ( { } , { cwd} ) ;
113117
114118 t . deepEqual ( actual , {
119+ formatter : '@commitlint/format' ,
115120 extends : [ './first-extended' ] ,
116121 rules : {
117122 zero : 0 ,
@@ -126,6 +131,7 @@ test('recursive extends with package.json file', async t => {
126131 const actual = await load ( { } , { cwd} ) ;
127132
128133 t . deepEqual ( actual , {
134+ formatter : '@commitlint/format' ,
129135 extends : [ './first-extended' ] ,
130136 rules : {
131137 zero : 0 ,
@@ -160,6 +166,7 @@ test('ignores unknow keys', async t => {
160166 const actual = await load ( { } , { cwd} ) ;
161167
162168 t . deepEqual ( actual , {
169+ formatter : '@commitlint/format' ,
163170 extends : [ ] ,
164171 rules : {
165172 foo : 'bar' ,
@@ -173,6 +180,7 @@ test('ignores unknow keys recursively', async t => {
173180 const actual = await load ( { } , { cwd} ) ;
174181
175182 t . deepEqual ( actual , {
183+ formatter : '@commitlint/format' ,
176184 extends : [ './one' ] ,
177185 rules : {
178186 zero : 0 ,
@@ -189,6 +197,7 @@ test('find up from given cwd', async t => {
189197 const actual = await load ( { } , { cwd} ) ;
190198
191199 t . deepEqual ( actual , {
200+ formatter : '@commitlint/format' ,
192201 extends : [ ] ,
193202 rules : {
194203 child : true ,
@@ -204,6 +213,7 @@ test('find up config from outside current git repo', async t => {
204213 const actual = await load ( { } , { cwd} ) ;
205214
206215 t . deepEqual ( actual , {
216+ formatter : '@commitlint/format' ,
207217 extends : [ ] ,
208218 rules : {
209219 child : false ,
@@ -212,3 +222,14 @@ test('find up config from outside current git repo', async t => {
212222 }
213223 } ) ;
214224} ) ;
225+
226+ test ( 'respects formatter option' , async t => {
227+ const cwd = await git . bootstrap ( 'fixtures/formatter' ) ;
228+ const actual = await load ( { } , { cwd} ) ;
229+
230+ t . deepEqual ( actual , {
231+ formatter : 'commitlint-junit' ,
232+ extends : [ ] ,
233+ rules : { }
234+ } ) ;
235+ } ) ;
0 commit comments