Skip to content

Commit

Permalink
removing tests because tests in command processor seem to be enough?
Browse files Browse the repository at this point in the history
Signed-off-by: Amber Torrise <amber.torrise@broadcom.com>
  • Loading branch information
ATorrise committed Oct 24, 2024
1 parent d978e0a commit a307dd5
Showing 1 changed file with 0 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,40 +272,6 @@ describe("Configuration Import command handler", () => {
expect(error.message).toContain("Unexpected token");
});

it("should display help text even when schema file is not valid JSON if --help flag is used", async () => {
const params: IHandlerParameters = getIHandlerParametersObject();
params.arguments.help = true; // Simulate --help flag

let error: any;

try {
if (params.arguments.help) {
await downloadSchema(new URL(schemaUrl), schemaDestPath);
}
} catch (err) {
error = err;
}

expect(error).toBeUndefined(); // Ensure no error when help flag is used
});

it("should display version even when schema file is not valid JSON if --version flag is used", async () => {
const params: IHandlerParameters = getIHandlerParametersObject();
params.arguments.version = true; // Simulate --version flag

let error: any;

try {
if (params.arguments.version) {
await downloadSchema(new URL(schemaUrl), schemaDestPath);
}
} catch (err) {
error = err;
}

expect(error).toBeUndefined(); // Ensure no error when version flag is used
});

it("should throw error when REST client fails to fetch schema file", async () => {
jest.spyOn(RestClient, "getExpectString").mockRejectedValueOnce(new Error("invalid URL"));
let error;
Expand Down

0 comments on commit a307dd5

Please sign in to comment.