Skip to content

Commit

Permalink
fixes serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrvadala committed Feb 12, 2024
1 parent 760a2c4 commit c7c0ecf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Adapter {
}

static serializeUUID (uuid) {
return `dev_${uuid.replace(/:/g, '_')}`
return `dev_${uuid.replace(/:/g, '_').toUpperCase()}`
}

static deserializeUUID (uuid) {
Expand Down
1 change: 1 addition & 0 deletions test/Adapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const Device = require('../src/Device')

test('serializeUUID', () => {
expect(Adapter.serializeUUID('00:00:00:00:00:00')).toEqual('dev_00_00_00_00_00_00')
expect(Adapter.serializeUUID('aa:BB:cc:DD:ee:FF')).toEqual('dev_AA_BB_CC_DD_EE_FF')
})

test('deserializeUUID', () => {
Expand Down

0 comments on commit c7c0ecf

Please sign in to comment.