From 033b3f46442eb431378cb7adc26a69c08fa5c7be Mon Sep 17 00:00:00 2001 From: Wojciech Czerniak Date: Sun, 27 Mar 2016 20:07:27 +0200 Subject: [PATCH] add test for rule name if was set correctly --- test/test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test.js b/test/test.js index f21d2db3..8c268ecb 100644 --- a/test/test.js +++ b/test/test.js @@ -193,6 +193,19 @@ describe( 'Core Methods: ', function() { app.lint() app.lint.getCall( 2 ).returned( sinon.match.same( app.done ) ) } ) + + it( 'should cache rule name as one of warning properties', function() { + app.config = { brackets : 'never'} + app.lint() + assert.equal( app.cache.rule, 'brackets' ) + + app.config = { leadingZero : 'never'} + app.lint() + assert.equal( app.cache.rule, 'leadingZero' ) + + // restore config + app.config = app.setConfig() + } ) } ) describe( 'Watch: ', function() {