mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-17 15:53:28 +02:00
Fix all test/ files with ESLint rules with 0 errors and 0 warnings.
This commit is contained in:
8
test/.eslintrc
Normal file
8
test/.eslintrc
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"env": {
|
||||
"mocha": true
|
||||
},
|
||||
"rules": {
|
||||
"no-unused-expressions": 0
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,10 @@ var expect = chai.expect
|
||||
var keyutil = require('../../lib/util/keyutil')
|
||||
|
||||
describe('keyutil', function() {
|
||||
|
||||
describe('parseKeyCharacterMap', function() {
|
||||
|
||||
it('should be able to parse Virtual.kcm', function(done) {
|
||||
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))
|
||||
.then(function(keymap) {
|
||||
@@ -21,7 +19,5 @@ describe('keyutil', function() {
|
||||
})
|
||||
.catch(done)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
@@ -4,7 +4,6 @@ var expect = chai.expect
|
||||
var logger = require('../../lib/util/logger')
|
||||
|
||||
describe('Logger', function() {
|
||||
|
||||
it('should have a createLogger method', function() {
|
||||
expect(logger).itself.to.respondTo('createLogger')
|
||||
})
|
||||
@@ -12,5 +11,4 @@ describe('Logger', function() {
|
||||
it('should have a setGlobalIdentifier method', function() {
|
||||
expect(logger).itself.to.respondTo('setGlobalIdentifier')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
@@ -6,7 +6,6 @@ chai.use(require('sinon-chai'))
|
||||
var TtlSet = require('../../lib/util/ttlset')
|
||||
|
||||
describe('TtlSet', function() {
|
||||
|
||||
it('should emit "drop" for entries with expired TTL', function(done) {
|
||||
var ttlset = new TtlSet(50)
|
||||
|
||||
@@ -30,7 +29,6 @@ describe('TtlSet', function() {
|
||||
})
|
||||
|
||||
describe('bump', function() {
|
||||
|
||||
it('should emit "insert" for new entries', function(done) {
|
||||
var ttlset = new TtlSet(50)
|
||||
|
||||
@@ -126,11 +124,9 @@ describe('TtlSet', function() {
|
||||
expect(ttlset.tail.prev).to.equal(ttlset.head)
|
||||
done()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
describe('drop', function() {
|
||||
|
||||
it('should emit "drop" for the dropped entry', function(done) {
|
||||
var ttlset = new TtlSet(50)
|
||||
|
||||
@@ -193,7 +189,5 @@ describe('TtlSet', function() {
|
||||
expect(ttlset.tail.value).to.equal(2)
|
||||
done()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user