mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
Return error code when any tsc typecheck fails (#5459)
* Return error code when any tsc typecheck fails * Try with bash `sh ./scripts/test-types.s` resulted in errors missing `[[`, which is a bash builtin. It's possible the ubuntu runner is using some other shell. * Fix spec type errors * Switch to node for Windows compatibility
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
describe("ServerConfigData", () => {
|
||||
describe("fromJSON", () => {
|
||||
it("should create a ServerConfigData from a JSON object", () => {
|
||||
const serverConfigData = ServerConfigData.fromJSON({
|
||||
const json = {
|
||||
version: "1.0.0",
|
||||
gitHash: "1234567890",
|
||||
server: {
|
||||
@@ -22,18 +22,11 @@ describe("ServerConfigData", () => {
|
||||
sso: "https://sso.com",
|
||||
},
|
||||
utcDate: "2020-01-01T00:00:00.000Z",
|
||||
});
|
||||
featureStates: { feature: "state" },
|
||||
};
|
||||
const serverConfigData = ServerConfigData.fromJSON(json);
|
||||
|
||||
expect(serverConfigData.version).toEqual("1.0.0");
|
||||
expect(serverConfigData.gitHash).toEqual("1234567890");
|
||||
expect(serverConfigData.server.name).toEqual("test");
|
||||
expect(serverConfigData.server.url).toEqual("https://test.com");
|
||||
expect(serverConfigData.environment.vault).toEqual("https://vault.com");
|
||||
expect(serverConfigData.environment.api).toEqual("https://api.com");
|
||||
expect(serverConfigData.environment.identity).toEqual("https://identity.com");
|
||||
expect(serverConfigData.environment.notifications).toEqual("https://notifications.com");
|
||||
expect(serverConfigData.environment.sso).toEqual("https://sso.com");
|
||||
expect(serverConfigData.utcDate).toEqual("2020-01-01T00:00:00.000Z");
|
||||
expect(serverConfigData).toEqual(json);
|
||||
});
|
||||
|
||||
it("should be an instance of ServerConfigData", () => {
|
||||
|
||||
Reference in New Issue
Block a user