mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-20 17:33:18 +00:00
Implement device.getSupportedDevices()
This commit is contained in:
parent
f56cd8162c
commit
8ee2568144
@ -6,3 +6,6 @@ exports.getDisplayName = (device) ->
|
||||
if _.indexOf(value, device) isnt -1
|
||||
return key
|
||||
return 'Unknown'
|
||||
|
||||
exports.getSupportedDevices = ->
|
||||
return _.keys(DEVICE_NAMES)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user