UNPKG

orionsoft-react-scripts

Version:

Orionsoft Configuration and scripts for Create React App.

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') }) })