Skip to content

Commit a2ea9bf

Browse files
committed
Last unit test fix
1 parent dec5c4f commit a2ea9bf

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/experimental/tools/mediaCapabilitiesProber/probers/__tests__/decodingInfo.test.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ describe("MediaCapabilitiesProber probers - decodingInfo", () => {
6161
try {
6262
await probeDecodingInfos(configuration);
6363
resetDecodingInfos();
64-
} catch ({ message }) {
64+
} catch (error) {
65+
const message = error instanceof Error ? error.message : "";
6566
thrownException = true;
6667
expect(message).toEqual("Not enough arguments for calling mediaCapabilites.");
6768
expect(decodingInfoStub).not.toHaveBeenCalled();
@@ -83,7 +84,8 @@ describe("MediaCapabilitiesProber probers - decodingInfo", () => {
8384
try {
8485
await probeDecodingInfos(configuration);
8586
resetDecodingInfos();
86-
} catch ({ message }) {
87+
} catch (error) {
88+
const message = error instanceof Error ? error.message : "";
8789
thrownException = true;
8890
expect(message).toEqual("Not enough arguments for calling mediaCapabilites.");
8991
expect(decodingInfoStub).not.toHaveBeenCalled();
@@ -105,7 +107,8 @@ describe("MediaCapabilitiesProber probers - decodingInfo", () => {
105107
try {
106108
await probeDecodingInfos(configuration);
107109
resetDecodingInfos();
108-
} catch ({ message }) {
110+
} catch (error) {
111+
const message = error instanceof Error ? error.message : "";
109112
thrownException = true;
110113
expect(message).toEqual("Not enough arguments for calling mediaCapabilites.");
111114
expect(decodingInfoStub).not.toHaveBeenCalled();
@@ -125,7 +128,8 @@ describe("MediaCapabilitiesProber probers - decodingInfo", () => {
125128
try {
126129
await probeDecodingInfos(configuration);
127130
resetDecodingInfos();
128-
} catch ({ message }) {
131+
} catch (error) {
132+
const message = error instanceof Error ? error.message : "";
129133
thrownException = true;
130134
expect(message).toEqual("Not enough arguments for calling mediaCapabilites.");
131135
expect(decodingInfoStub).not.toHaveBeenCalled();
@@ -142,7 +146,8 @@ describe("MediaCapabilitiesProber probers - decodingInfo", () => {
142146
try {
143147
await probeDecodingInfos(configuration);
144148
resetDecodingInfos();
145-
} catch ({ message }) {
149+
} catch (error) {
150+
const message = error instanceof Error ? error.message : "";
146151
thrownException = true;
147152
expect(message).toEqual("Not enough arguments for calling mediaCapabilites.");
148153
expect(decodingInfoStub).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)