From 312b5ec627e9b494ac455475efe7851bed70c34e Mon Sep 17 00:00:00 2001 From: Jeremy LaCivita Date: Thu, 10 Aug 2023 08:59:51 -0400 Subject: [PATCH] fix: Update firebolt-openrpc, fix tests --- package-lock.json | 10 ++++++---- package.json | 2 +- .../manage/test/suite/closedCaptions.test.ts | 17 +++++++---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1afe16427..af4dbb3ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,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", @@ -1045,9 +1045,9 @@ "link": true }, "node_modules/@firebolt-js/openrpc": { - "version": "2.0.4-next.1", - "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-2.0.4-next.1.tgz", - "integrity": "sha512-DWbTF5+dfRsAMRDJzQHzFq7AAK6RlypEy54lXB418EzzpeP0tCmT7+alcgwJamRCsGcWxUOulmIGbogMyIoNmw==", + "version": "2.0.4-next.3", + "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-2.0.4-next.3.tgz", + "integrity": "sha512-REMosHy8+iM5bnP3F7sA5A9qE+qj250lCfZjXaudyptoDXVQ0RFBDyxPRsCehhDe9qiBj+pfQKtak76Qmr4ekg==", "dev": true, "dependencies": { "ajv": "^8.3.0", @@ -12752,6 +12752,7 @@ } }, "src/sdks/core": { + "name": "@firebolt-js/sdk", "version": "0.16.0-next.1", "license": "Apache-2.0", "devDependencies": { @@ -12761,6 +12762,7 @@ } }, "src/sdks/manage": { + "name": "@firebolt-js/manage-sdk", "version": "0.16.0-next.1", "license": "Apache-2.0", "devDependencies": { diff --git a/package.json b/package.json index 25ba9d0a7..1fa78e241 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/sdks/manage/test/suite/closedCaptions.test.ts b/src/sdks/manage/test/suite/closedCaptions.test.ts index 11b5d2d16..8d48bcf6d 100644 --- a/src/sdks/manage/test/suite/closedCaptions.test.ts +++ b/src/sdks/manage/test/suite/closedCaptions.test.ts @@ -87,7 +87,7 @@ test("ClosedCaptions.textAlignVertical()", () => { test("ClosedCaptions.listen()", () => { return ClosedCaptions.listen("fontColorChanged", () => {}).then( - (res: Number) => { + (res: number) => { expect(res > 0).toBe(true); } ); @@ -95,7 +95,7 @@ test("ClosedCaptions.listen()", () => { test("ClosedCaptions.once()", () => { return ClosedCaptions.once("fontColorChanged", () => {}).then( - (res: Number) => { + (res: number) => { expect(res > 0).toBe(true); } ); @@ -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) }); }); @@ -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"); - }); -}); \ No newline at end of file