fixing failing tests
This commit is contained in:
+3
-3
@@ -18,11 +18,11 @@ describe("Get gateway data", (): void => {
|
||||
expect(typeof gateway.owner).toBe('string');
|
||||
expect(typeof gateway.block_height).toBe('number');
|
||||
|
||||
if (typeof gateway.proxy === null) {
|
||||
return;
|
||||
if (gateway.proxy === null) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
expect(typeof gateway.proxy).toBe('string'); //this is failing as it's returning "object"
|
||||
expect(typeof gateway.proxy).toBe('string');
|
||||
}
|
||||
|
||||
//pledge_amount
|
||||
|
||||
+6
-6
@@ -21,11 +21,11 @@ describe("Get mixnode data", (): void => {
|
||||
expect(typeof mixnode.layer).toBe('number');
|
||||
expect(typeof mixnode.accumulated_rewards).toBe('string');
|
||||
|
||||
if (typeof mixnode.proxy === null) {
|
||||
return;
|
||||
if (mixnode.proxy === null) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
expect(typeof mixnode.proxy).toBe('string'); //this is failing as it's returning "object"
|
||||
expect(typeof mixnode.proxy).toBe('string');
|
||||
}
|
||||
|
||||
//pledge
|
||||
@@ -104,11 +104,11 @@ describe("Get mixnode data", (): void => {
|
||||
expect(typeof mixnode.mixnode_bond.layer).toBe('number');
|
||||
expect(typeof mixnode.mixnode_bond.accumulated_rewards).toBe('string');
|
||||
|
||||
if (typeof mixnode.mixnode_bond.proxy === null) {
|
||||
return;
|
||||
if (mixnode.mixnode_bond.proxy === null) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
expect(typeof mixnode.mixnode_bond.proxy).toBe('string'); //this is failing as it's returning "object"
|
||||
expect(typeof mixnode.mixnode_bond.proxy).toBe('string');
|
||||
}
|
||||
|
||||
//overview
|
||||
|
||||
@@ -4,7 +4,7 @@ import ConfigHandler from "../../../src/config/configHandler";
|
||||
let status: Status;
|
||||
let config: ConfigHandler;
|
||||
|
||||
describe.skip("Get gateway data", (): void => {
|
||||
describe("Get gateway data", (): void => {
|
||||
beforeAll(async (): Promise<void> => {
|
||||
status = new Status();
|
||||
config = ConfigHandler.getInstance();
|
||||
|
||||
@@ -22,10 +22,10 @@ describe("Get mixnode data", (): void => {
|
||||
});
|
||||
|
||||
it("Get a mixnode status report", async (): Promise<void> => {
|
||||
const identity_key = config.environmnetConfig.gateway_identity;
|
||||
const identity_key = config.environmnetConfig.mixnode_identity;
|
||||
const response = await status.getMixnodeStatusReport(identity_key);
|
||||
|
||||
expect(identity_key).toStrictEqual(response.identity); // this validation is failing, expected undefined
|
||||
expect(identity_key).toStrictEqual(response.identity);
|
||||
expect(typeof response.owner).toBe("string");
|
||||
expect(typeof response.most_recent).toBe("number");
|
||||
expect(typeof response.last_hour).toBe("number");
|
||||
|
||||
Reference in New Issue
Block a user