Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 9, 2024
1 parent 181af06 commit 315d752
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions holo-key-manager-extension/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe('transformDataToIndexedArray', () => {
it('should transform GetKeysResponse array to ArrayKeyItem array in proper index order', () => {
const input: GetKeysResponse[] = [
{
newKey: 'newKey2',
appName: 'App2',
installedAppId: 'app2-id',
appIndex: 1,
Expand All @@ -17,6 +18,7 @@ describe('transformDataToIndexedArray', () => {
}
},
{
newKey: 'newKey1',
appName: 'App1',
installedAppId: 'app1-id',
appIndex: 0,
Expand All @@ -27,6 +29,7 @@ describe('transformDataToIndexedArray', () => {
}
},
{
newKey: 'newKey3',
appName: 'App3',
installedAppId: 'app3-id',
appIndex: 3,
Expand All @@ -37,6 +40,7 @@ describe('transformDataToIndexedArray', () => {
}
},
{
newKey: 'newKey4',
appName: 'App4',
installedAppId: 'app4-id',
appIndex: 2,
Expand All @@ -47,6 +51,7 @@ describe('transformDataToIndexedArray', () => {
}
},
{
newKey: 'newKey5',
appName: 'App5',
installedAppId: 'app5-id',
appIndex: 4,
Expand All @@ -60,27 +65,31 @@ describe('transformDataToIndexedArray', () => {

const expectedOutput = [
{
newKey: 'newKey1',
happId: 'app1-id',
happName: 'App1',
keyName: 'key1',
happLogo: 'logo1.png',
happUiUrl: 'http://app1.com'
},
{
newKey: 'newKey2',
happId: 'app2-id',
happName: 'App2',
keyName: 'key2',
happLogo: 'logo2.png',
happUiUrl: 'http://app2.com'
},
{
newKey: 'newKey4',
happId: 'app4-id',
happName: 'App4',
keyName: 'key4',
happLogo: 'logo4.png',
happUiUrl: 'http://app4.com'
},
{
newKey: 'newKey3',
happId: 'app3-id',
happName: 'App3',
keyName: 'key1',
Expand All @@ -89,6 +98,7 @@ describe('transformDataToIndexedArray', () => {
},

{
newKey: 'newKey5',
happId: 'app5-id',
happName: 'App5',
keyName: 'key5',
Expand Down

0 comments on commit 315d752

Please sign in to comment.