cleanup tests

This commit is contained in:
Audric Ackermann 2021-05-24 11:43:51 +10:00
parent 45fa878790
commit a777b09165
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
3 changed files with 2 additions and 5 deletions

View File

@ -14,7 +14,6 @@ import { snodeRpc } from './lokiRpc';
import { getRandomSnode, getRandomSnodePool, requiredSnodesForAgreement, Snode } from './snodePool';
import { Constants } from '..';
import { sha256 } from '../crypto';
import pRetry from 'p-retry';
import _ from 'lodash';
const getSslAgentForSeedNode = (seedNodeHost: string, isSsl = false) => {

View File

@ -223,7 +223,6 @@ async function getSnodeListFromLokidSeednode(
export async function refreshRandomPoolDetail(seedNodes: Array<SeedNode>): Promise<Array<Snode>> {
let snodes = [];
try {
throw new Error('this should be stubed');
snodes = await getSnodeListFromLokidSeednode(seedNodes);
// make sure order of the list is random, so we get version in a non-deterministic way
snodes = _.shuffle(snodes);

View File

@ -15,7 +15,6 @@ import AbortController from 'abort-controller';
import * as Data from '../../../../../ts/data/data';
import { Snode } from '../../../../session/snode_api/snodePool';
import { fromArrayBufferToBase64 } from '../../../../session/utils/String';
import { Onions } from '../../../../../ts/session/snode_api/';
chai.use(chaiAsPromised as any);
chai.should();
@ -220,7 +219,7 @@ describe('OnionPathsErrors', () => {
} as any,
});
sandbox
.stub(Onions, 'decodeOnionResult')
.stub(SNodeAPI.Onions, 'decodeOnionResult')
.resolves({ plaintext: json, ciphertextBuffer: new Uint8Array() });
try {
@ -260,7 +259,7 @@ describe('OnionPathsErrors', () => {
} as any,
});
sandbox
.stub(Onions, 'decodeOnionResult')
.stub(SNodeAPI.Onions, 'decodeOnionResult')
.resolves({ plaintext: json, ciphertextBuffer: new Uint8Array() });
try {