Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gergas3 committed Oct 25, 2023
1 parent a8a4424 commit 994af98
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions client/__tests__/__snapshots__/filter.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json path filter returns only selected fields 1`] = `
{
"data": {
"items": [
{
"metadata": {
"name": "admin",
},
},
{
"metadata": {
"name": "aws-node",
},
},
],
"kind": "ClusterRoleList",
},
"headers": {
"audit-id": "6a816d03-d29f-4657-b624-35766c8a5572",
"cache-control": "no-cache, private",
"content-type": "application/json",
"date": "Wed, 25 Oct 2023 06:08:30 GMT",
"transfer-encoding": "chunked",
"x-kubernetes-pf-flowschema-uid": "ef7c3d21-4649-422d-a4fa-e5b85d52f141",
"x-kubernetes-pf-prioritylevel-uid": "a6704cd4-c4fb-48bb-982e-a1ed79bfb12d",
},
"status": 200,
"statusText": "OK",
}
`;
2 changes: 1 addition & 1 deletion client/__tests__/filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ describe("json path filter", () => {
"{ headers: .headers, status: .status, statusText: .statusText, data: { kind: .data.kind, items: [.data.items[] | { metadata: { name: .metadata.name } }] } }"
);

expect(result).toEqual(["admin", "aws-node"]);
expect(result).toMatchSnapshot();
});
});

0 comments on commit 994af98

Please sign in to comment.