Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
countcain committed Mar 13, 2024
1 parent 61f967f commit f70d14c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/operand/__test__/unit/reference.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ describe('Operand - Value', () => {
subSubE: [{ subSubSubE: 6 }],
},
],
// key with backticks are acceptable
'sub`E.dotKey': { subSubE: 7 },
'sub`E.dotKey`': { subSubE: 8 },
},
RefD: 'A',
RefE: 'D',
Expand Down Expand Up @@ -69,6 +72,8 @@ describe('Operand - Value', () => {
// yield an undefined since this is a wrong syntax to access array item for a key that contains a dot
['RefC.`subD.dotKey[0]`.subSubD', undefined],
['RefC.`subD.dotKey`[0].subSubE[0].subSubSubE', 6],
['RefC.`sub`E.dotKey`.subSubE', 7],
['RefC.`sub`E.dotKey``.subSubE', 8],
// Missing
['RefB', undefined],
['RefC.subC', undefined],
Expand Down

0 comments on commit f70d14c

Please sign in to comment.