@@ -211,6 +211,20 @@ describe("config", function () {
211211 } ) ;
212212 } ) ;
213213
214+ it ( "should work with a local object with matching files" , function ( ) {
215+ const userConfig : UserConfig = {
216+ files : [ "./path/**/*.js" ] ,
217+ rules : { "some-rule" : "off" } ,
218+ } ;
219+ const configLoader = BasicConfigLoader . create ( userConfig ) ;
220+
221+ const config = configLoader . loadConfig ( "./path/to/file.js" ) ;
222+
223+ expect ( config ) . toEqual ( {
224+ rules : { "some-rule" : [ "off" ] } ,
225+ } ) ;
226+ } ) ;
227+
214228 it ( "should work with an object with no matching files" , function ( ) {
215229 const userConfig : UserConfig = {
216230 files : [ "/path/**/*.js" ] ,
@@ -239,6 +253,20 @@ describe("config", function () {
239253 } ) ;
240254 } ) ;
241255
256+ it ( "should work with a local object with matching ignores" , function ( ) {
257+ const userConfig : UserConfig = {
258+ ignores : [ "./path/**/*.js" ] ,
259+ rules : { "some-rule" : "off" } ,
260+ } ;
261+ const configLoader = BasicConfigLoader . create ( userConfig ) ;
262+
263+ const config = configLoader . loadConfig ( "./path/to/file.js" ) ;
264+
265+ expect ( config ) . toEqual ( {
266+ rules : { } ,
267+ } ) ;
268+ } ) ;
269+
242270 it ( "should work with an object with no matching ignores" , function ( ) {
243271 const userConfig : UserConfig = {
244272 ignores : [ "/path/**/*.js" ] ,
0 commit comments