mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Add a very lazy test for keyutil.parseKeyCharacterMap().
This commit is contained in:
parent
329b862e4f
commit
077982f08a
4 changed files with 4862 additions and 1 deletions
27
test/util/keyutil.js
Normal file
27
test/util/keyutil.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
var path = require('path')
|
||||
var fs = require('fs')
|
||||
|
||||
var chai = require('chai')
|
||||
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')
|
||||
|
||||
keyutil.parseKeyCharacterMap(fs.createReadStream(source))
|
||||
.then(function(keymap) {
|
||||
expect(keymap).to.eql(expected)
|
||||
done()
|
||||
})
|
||||
.catch(done)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue