Implement device.getSupportedDevices()

This commit is contained in:
Juan Cruz Viotti 2014-11-24 08:25:45 -04:00
parent f56cd8162c
commit 8ee2568144
2 changed files with 9 additions and 0 deletions

View File

@ -6,3 +6,6 @@ exports.getDisplayName = (device) ->
if _.indexOf(value, device) isnt -1
return key
return 'Unknown'
exports.getSupportedDevices = ->
return _.keys(DEVICE_NAMES)

View File

@ -25,3 +25,9 @@ describe 'Device:', ->
for name in unknownNames
expect(device.getDisplayName(name)).to.equal('Unknown')
describe '#getSupportedDevices()', ->
it 'should return an array', ->
result = device.getSupportedDevices()
expect(result).to.be.an.instanceof(Array)