UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

21 lines (18 loc) 622 B
var standard = require('../') var test = require('tape') test('api: lintFiles', function (t) { t.plan(3) standard.lintFiles([], { cwd: 'bin' }, function (err, result) { t.error(err, 'no error while linting') t.equal(typeof result, 'object', 'result is an object') t.equal(result.errorCount, 0) }) }) test('api: lintText', function (t) { t.plan(3) standard.lintText('console.log("hi there")\n', function (err, result) { t.error(err, 'no error while linting') t.equal(typeof result, 'object', 'result is an object') t.equal(result.errorCount, 1, 'should have used single quotes') }) })