Skip to content

Commit

Permalink
fix: Update firebolt-openrpc, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Aug 10, 2023
1 parent 7e011e2 commit 312b5ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
10 changes: 6 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@firebolt-js/openrpc": "2.0.4-next.1",
"@firebolt-js/openrpc": "2.0.4-next.3",
"@firebolt-js/schemas": "1.0.0-next.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
Expand Down
17 changes: 7 additions & 10 deletions src/sdks/manage/test/suite/closedCaptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ test("ClosedCaptions.textAlignVertical()", () => {

test("ClosedCaptions.listen()", () => {
return ClosedCaptions.listen("fontColorChanged", () => {}).then(
(res: Number) => {
(res: number) => {
expect(res > 0).toBe(true);
}
);
});

test("ClosedCaptions.once()", () => {
return ClosedCaptions.once("fontColorChanged", () => {}).then(
(res: Number) => {
(res: number) => {
expect(res > 0).toBe(true);
}
);
Expand All @@ -106,9 +106,12 @@ test("clear", () => {
expect(result).toBeFalsy();
});

test("ClosedCaptions.setFontColor() with null", () => {
return ClosedCaptions.fontColor(null).then((res: null) => {
test("ClosedCaptions.setFontColor() with null", async () => {
const oldValue = await ClosedCaptions.fontColor()
return ClosedCaptions.fontColor(null).then(async (res: null) => {
expect(res).toBe(null);
const newValue = await ClosedCaptions.fontColor()
expect(newValue).toBe(null)
});
});

Expand All @@ -117,9 +120,3 @@ test("ClosedCaptions.setFontColor() with ffffff", () => {
expect(res).toBe(null);
});
});

test("ClosedCaptions.setFontColor() with undefined", () => {
return ClosedCaptions.fontColor(undefined).then((res: string) => {
expect(res).toBe("#ffffff");
});
});

0 comments on commit 312b5ec

Please sign in to comment.