1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-03 09:49:17 +02:00

Fix all test/ files with ESLint rules with 0 errors and 0 warnings.

This commit is contained in:
Gunther Brunner 2016-01-19 20:56:19 +09:00
parent 434f63b3a9
commit b2217d01dd
4 changed files with 9 additions and 13 deletions

8
test/.eslintrc Normal file
View file

@ -0,0 +1,8 @@
{
"env": {
"mocha": true
},
"rules": {
"no-unused-expressions": 0
}
}

View file

@ -7,12 +7,10 @@ var expect = chai.expect
var keyutil = require('../../lib/util/keyutil') var keyutil = require('../../lib/util/keyutil')
describe('keyutil', function() { describe('keyutil', function() {
describe('parseKeyCharacterMap', function() { describe('parseKeyCharacterMap', function() {
it('should be able to parse Virtual.kcm', function(done) { it('should be able to parse Virtual.kcm', function(done) {
var expected = require('../fixt/Virtual.kcm.json') var expected = require('../fixt/Virtual.kcm.json')
, source = path.join(__dirname, '..', 'fixt', 'Virtual.kcm') var source = path.join(__dirname, '..', 'fixt', 'Virtual.kcm')
keyutil.parseKeyCharacterMap(fs.createReadStream(source)) keyutil.parseKeyCharacterMap(fs.createReadStream(source))
.then(function(keymap) { .then(function(keymap) {
@ -21,7 +19,5 @@ describe('keyutil', function() {
}) })
.catch(done) .catch(done)
}) })
}) })
}) })

View file

@ -4,7 +4,6 @@ var expect = chai.expect
var logger = require('../../lib/util/logger') var logger = require('../../lib/util/logger')
describe('Logger', function() { describe('Logger', function() {
it('should have a createLogger method', function() { it('should have a createLogger method', function() {
expect(logger).itself.to.respondTo('createLogger') expect(logger).itself.to.respondTo('createLogger')
}) })
@ -12,5 +11,4 @@ describe('Logger', function() {
it('should have a setGlobalIdentifier method', function() { it('should have a setGlobalIdentifier method', function() {
expect(logger).itself.to.respondTo('setGlobalIdentifier') expect(logger).itself.to.respondTo('setGlobalIdentifier')
}) })
}) })

View file

@ -6,7 +6,6 @@ chai.use(require('sinon-chai'))
var TtlSet = require('../../lib/util/ttlset') var TtlSet = require('../../lib/util/ttlset')
describe('TtlSet', function() { describe('TtlSet', function() {
it('should emit "drop" for entries with expired TTL', function(done) { it('should emit "drop" for entries with expired TTL', function(done) {
var ttlset = new TtlSet(50) var ttlset = new TtlSet(50)
@ -30,7 +29,6 @@ describe('TtlSet', function() {
}) })
describe('bump', function() { describe('bump', function() {
it('should emit "insert" for new entries', function(done) { it('should emit "insert" for new entries', function(done) {
var ttlset = new TtlSet(50) var ttlset = new TtlSet(50)
@ -126,11 +124,9 @@ describe('TtlSet', function() {
expect(ttlset.tail.prev).to.equal(ttlset.head) expect(ttlset.tail.prev).to.equal(ttlset.head)
done() done()
}) })
}) })
describe('drop', function() { describe('drop', function() {
it('should emit "drop" for the dropped entry', function(done) { it('should emit "drop" for the dropped entry', function(done) {
var ttlset = new TtlSet(50) var ttlset = new TtlSet(50)
@ -193,7 +189,5 @@ describe('TtlSet', function() {
expect(ttlset.tail.value).to.equal(2) expect(ttlset.tail.value).to.equal(2)
done() done()
}) })
}) })
}) })