Skip to content

Commit

Permalink
test: add smoke test ensuring all rules make it into lib/index
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Jul 20, 2020
1 parent 530a69b commit 663dbbf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/check-rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* globals describe, it*/
const config = require('../lib/index.js')
const fs = require('fs')
const assert = require('assert')
const path = require('path')

describe('smoke tests', () => {
it('ensure all rules in lib/rules are included in index', () => {
const exportedRules = new Set(Object.keys(config.rules))
const files = new Set(fs.readdirSync('./lib/rules').map(f => path.basename(f, path.extname(f))))
assert.deepEqual(files, exportedRules)
})
})

0 comments on commit 663dbbf

Please sign in to comment.