mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Test other escaped characters do not cause issues
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
57ada52438
commit
92b3a31a78
@ -7,6 +7,12 @@ describe("parseJsonPath", () => {
|
||||
expect(res).toBe(".metadata.labels['kubesphere.io/alias-name']");
|
||||
});
|
||||
|
||||
test("should convert keys with escpaped charatecrs to use indexed notation", () => {
|
||||
const res = parseJsonPath(".metadata.labels.kubesphere\\\"io/alias-name");
|
||||
|
||||
expect(res).toBe(".metadata.labels['kubesphere\"io/alias-name']");
|
||||
});
|
||||
|
||||
test("should convert '-' to use indexed notation", () => {
|
||||
const res = parseJsonPath(".metadata.labels.alias-name");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user