remove the explicit throw is new parseApi

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
Sebastian Malton committed 2020-06-18 11:28:03 -04:00
1 parent d55803d0c7
commit 1107ff3e43
3 files changed
+21 -18

No files matched your search

+14 -1
View File
@@ -45,10 +45,23 @@ const tests: ParseAPITest[] = [
namespace: undefined,
},
},
{
url: "/apis/namespaces/default/es/gke-svc-vodka-1-app-1-w-l-1-9eea2bfe-4jnl",
expected: {
apiBase: "/apis",
apiPrefix: "/apis",
apiGroup: undefined,
apiVersion: undefined,
apiVersionWithGroup: "",
resource: undefined,
name: undefined,
namespace: undefined,
},
},
];
jest.mock('../kube-watch-api.ts', () => 'KubeWatchApi');
describe("parseAPI unit tests", () => {
describe("parseApi unit tests", () => {
for (const i in tests) {
const { url: tUrl, expected:tExpect} = tests[i];
test(`test #${parseInt(i)+1}`, () => {