You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
850 B

4 years ago
  1. require('./lib/rules/all.js');
  2. const assert = require('assert');
  3. const plugin = require('../');
  4. assert.equal(plugin.configs['all-warn'].rules['you-dont-need-lodash-underscore/contains'], 1);
  5. assert.equal(plugin.configs['all-warn'].rules['you-dont-need-lodash-underscore/trim'], 1);
  6. assert.equal(plugin.configs.all.rules['you-dont-need-lodash-underscore/every'], 2);
  7. assert.equal(plugin.configs.all.rules['you-dont-need-lodash-underscore/keys'], 2);
  8. assert.equal(plugin.configs['compatible-warn'].rules['you-dont-need-lodash-underscore/each'], undefined);
  9. assert.equal(plugin.configs['compatible-warn'].rules['you-dont-need-lodash-underscore/last-index-of'], 1);
  10. assert.equal(plugin.configs.compatible.rules['you-dont-need-lodash-underscore/for-each'], 1);
  11. assert.equal(plugin.configs.compatible.rules['you-dont-need-lodash-underscore/is-nan'], 2);