mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
cleanup tests
This commit is contained in:
parent
45fa878790
commit
a777b09165
3 changed files with 2 additions and 5 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue