Skip to content

Commit

Permalink
Removing type validation for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanCrd committed Dec 14, 2021
1 parent f2babd4 commit 0c6d019
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ describe("tracingHelpers", () => {

assert.fail("Exception should have been thrown from `trace` since the inner action threw");
} catch (err) {
if (!(err instanceof Error)) {
throw new Error("Error is not recognized");
}
assert.equal(err.message, "Purposefully thrown error");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
import { assert } from "chai";

import { DefaultAzureCredential, TokenCredential } from "@azure/identity";
import { RestError } from "@azure/core-http";

let connectionStringNotPresentWarning = false;
let tokenCredentialsNotPresentWarning = false;
Expand Down Expand Up @@ -163,9 +162,6 @@ export async function assertThrowsRestError(
await testFunction();
assert.fail(`${message}: No error thrown`);
} catch (err) {
if (!(err instanceof RestError)) {
throw new Error("Error is not recognized");
}
if (err.name === "RestError") {
assert.equal(expectedStatusCode, err.statusCode, message);
return err;
Expand All @@ -185,9 +181,6 @@ export async function assertThrowsAbortError(
await testFunction();
assert.fail(`${message}: No error thrown`);
} catch (e) {
if (!(e instanceof Error)) {
throw new Error("Error is not recognized");
}
if (isPlaybackMode() && (e.name === "FetchError" || e.name === "AbortError")) {
return e;
} else {
Expand Down

0 comments on commit 0c6d019

Please sign in to comment.