@@ -58,6 +58,7 @@ test('respects cwd option', async t => {
58
58
const cwd = await git . bootstrap ( 'fixtures/recursive-extends/first-extended' ) ;
59
59
const actual = await load ( { } , { cwd} ) ;
60
60
t . deepEqual ( actual , {
61
+ formatter : '@commitlint/format' ,
61
62
extends : [ './second-extended' ] ,
62
63
rules : {
63
64
one : 1 ,
@@ -70,6 +71,7 @@ test('recursive extends', async t => {
70
71
const cwd = await git . bootstrap ( 'fixtures/recursive-extends' ) ;
71
72
const actual = await load ( { } , { cwd} ) ;
72
73
t . deepEqual ( actual , {
74
+ formatter : '@commitlint/format' ,
73
75
extends : [ './first-extended' ] ,
74
76
rules : {
75
77
zero : 0 ,
@@ -84,6 +86,7 @@ test('recursive extends with json file', async t => {
84
86
const actual = await load ( { } , { cwd} ) ;
85
87
86
88
t . deepEqual ( actual , {
89
+ formatter : '@commitlint/format' ,
87
90
extends : [ './first-extended' ] ,
88
91
rules : {
89
92
zero : 0 ,
@@ -98,6 +101,7 @@ test('recursive extends with yaml file', async t => {
98
101
const actual = await load ( { } , { cwd} ) ;
99
102
100
103
t . deepEqual ( actual , {
104
+ formatter : '@commitlint/format' ,
101
105
extends : [ './first-extended' ] ,
102
106
rules : {
103
107
zero : 0 ,
@@ -112,6 +116,7 @@ test('recursive extends with js file', async t => {
112
116
const actual = await load ( { } , { cwd} ) ;
113
117
114
118
t . deepEqual ( actual , {
119
+ formatter : '@commitlint/format' ,
115
120
extends : [ './first-extended' ] ,
116
121
rules : {
117
122
zero : 0 ,
@@ -126,6 +131,7 @@ test('recursive extends with package.json file', async t => {
126
131
const actual = await load ( { } , { cwd} ) ;
127
132
128
133
t . deepEqual ( actual , {
134
+ formatter : '@commitlint/format' ,
129
135
extends : [ './first-extended' ] ,
130
136
rules : {
131
137
zero : 0 ,
@@ -160,6 +166,7 @@ test('ignores unknow keys', async t => {
160
166
const actual = await load ( { } , { cwd} ) ;
161
167
162
168
t . deepEqual ( actual , {
169
+ formatter : '@commitlint/format' ,
163
170
extends : [ ] ,
164
171
rules : {
165
172
foo : 'bar' ,
@@ -173,6 +180,7 @@ test('ignores unknow keys recursively', async t => {
173
180
const actual = await load ( { } , { cwd} ) ;
174
181
175
182
t . deepEqual ( actual , {
183
+ formatter : '@commitlint/format' ,
176
184
extends : [ './one' ] ,
177
185
rules : {
178
186
zero : 0 ,
@@ -189,6 +197,7 @@ test('find up from given cwd', async t => {
189
197
const actual = await load ( { } , { cwd} ) ;
190
198
191
199
t . deepEqual ( actual , {
200
+ formatter : '@commitlint/format' ,
192
201
extends : [ ] ,
193
202
rules : {
194
203
child : true ,
@@ -204,6 +213,7 @@ test('find up config from outside current git repo', async t => {
204
213
const actual = await load ( { } , { cwd} ) ;
205
214
206
215
t . deepEqual ( actual , {
216
+ formatter : '@commitlint/format' ,
207
217
extends : [ ] ,
208
218
rules : {
209
219
child : false ,
@@ -212,3 +222,14 @@ test('find up config from outside current git repo', async t => {
212
222
}
213
223
} ) ;
214
224
} ) ;
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