move unit tests to sub folder
parent
c12c3b5f64
commit
80b0821781
@ -1,13 +1,13 @@
|
||||
import { expect } from 'chai';
|
||||
import * as crypto from 'crypto';
|
||||
import * as sinon from 'sinon';
|
||||
import { MessageEncrypter } from '../../../session/crypto';
|
||||
import { EncryptionType } from '../../../session/types/EncryptionType';
|
||||
import { Stubs, TestUtils } from '../../test-utils';
|
||||
import { UserUtil } from '../../../util';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { MessageEncrypter } from '../../../../session/crypto';
|
||||
import { EncryptionType } from '../../../../session/types/EncryptionType';
|
||||
import { Stubs, TestUtils } from '../../../test-utils';
|
||||
import { UserUtil } from '../../../../util';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
|
||||
import * as Ratchet from '../../../session/medium_group/ratchet';
|
||||
import * as Ratchet from '../../../../session/medium_group/ratchet';
|
||||
|
||||
// tslint:disable-next-line: max-func-body-length
|
||||
describe('MessageEncrypter', () => {
|
@ -1,9 +1,9 @@
|
||||
import { expect } from 'chai';
|
||||
import { beforeEach } from 'mocha';
|
||||
|
||||
import { DeviceUnlinkMessage } from '../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { Constants } from '../../../session';
|
||||
import { DeviceUnlinkMessage } from '../../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
import { Constants } from '../../../../session';
|
||||
|
||||
describe('DeviceUnlinkMessage', () => {
|
||||
let message: DeviceUnlinkMessage;
|
@ -1,10 +1,10 @@
|
||||
import { expect } from 'chai';
|
||||
import { beforeEach } from 'mocha';
|
||||
|
||||
import { EndSessionMessage } from '../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { EndSessionMessage } from '../../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
import { TextEncoder } from 'util';
|
||||
import { Constants } from '../../../session';
|
||||
import { Constants } from '../../../../session';
|
||||
|
||||
describe('EndSessionMessage', () => {
|
||||
let message: EndSessionMessage;
|
@ -1,9 +1,9 @@
|
||||
import { expect } from 'chai';
|
||||
import { beforeEach } from 'mocha';
|
||||
|
||||
import { GroupInvitationMessage } from '../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { Constants } from '../../../session';
|
||||
import { GroupInvitationMessage } from '../../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
import { Constants } from '../../../../session';
|
||||
|
||||
describe('GroupInvitationMessage', () => {
|
||||
let message: GroupInvitationMessage;
|
@ -1,9 +1,9 @@
|
||||
import { expect } from 'chai';
|
||||
import { beforeEach } from 'mocha';
|
||||
|
||||
import { SessionEstablishedMessage } from '../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { Constants } from '../../../session';
|
||||
import { SessionEstablishedMessage } from '../../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
import { Constants } from '../../../../session';
|
||||
|
||||
describe('SessionEstablishedMessage', () => {
|
||||
let message: SessionEstablishedMessage;
|
@ -1,10 +1,10 @@
|
||||
import { expect } from 'chai';
|
||||
import { beforeEach } from 'mocha';
|
||||
|
||||
import { SessionRequestMessage } from '../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { SessionRequestMessage } from '../../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
import { TextDecoder, TextEncoder } from 'util';
|
||||
import { Constants } from '../../../session';
|
||||
import { Constants } from '../../../../session';
|
||||
|
||||
describe('SessionRequestMessage', () => {
|
||||
let message: SessionRequestMessage;
|
@ -1,13 +1,12 @@
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { TypingMessage } from '../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../protobuf';
|
||||
import { TextEncoder } from 'util';
|
||||
import { TypingMessage } from '../../../../session/messages/outgoing';
|
||||
import { SignalService } from '../../../../protobuf';
|
||||
import Long from 'long';
|
||||
import { toNumber } from 'lodash';
|
||||
import { StringUtils } from '../../../session/utils';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { Constants } from '../../../session';
|
||||
import { StringUtils } from '../../../../session/utils';
|
||||
import { TestUtils } from '../../../test-utils';
|
||||
import { Constants } from '../../../../session';
|
||||
|
||||
describe('TypingMessage', () => {
|
||||
it('has Action.STARTED if isTyping = true', () => {
|
@ -1,11 +1,11 @@
|
||||
import { expect } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { PairingAuthorisation } from '../../../../js/modules/data';
|
||||
import { MultiDeviceProtocol } from '../../../session/protocols';
|
||||
import { PubKey } from '../../../session/types';
|
||||
import { UserUtil } from '../../../util';
|
||||
import { StringUtils } from '../../../session/utils';
|
||||
import { TestUtils } from '../../../test-utils';
|
||||
import { PairingAuthorisation } from '../../../../../js/modules/data';
|
||||
import { MultiDeviceProtocol } from '../../../../session/protocols';
|
||||
import { PubKey } from '../../../../session/types';
|
||||
import { UserUtil } from '../../../../util';
|
||||
import { StringUtils } from '../../../../session/utils';
|
||||
|
||||
function generateFakeAuthorisations(
|
||||
primary: PubKey,
|
@ -1,12 +1,12 @@
|
||||
import { expect } from 'chai';
|
||||
import { SessionProtocol } from '../../../session/protocols';
|
||||
import * as sinon from 'sinon';
|
||||
import { Stubs, TestUtils } from '../../test-utils';
|
||||
import { UserUtil } from '../../../util';
|
||||
import { SessionRequestMessage } from '../../../session/messages/outgoing';
|
||||
import { SessionProtocol } from '../../../../session/protocols';
|
||||
import { Stubs, TestUtils } from '../../../test-utils';
|
||||
import { UserUtil } from '../../../../util';
|
||||
import { SessionRequestMessage } from '../../../../session/messages/outgoing';
|
||||
import { TextEncoder } from 'util';
|
||||
import { MessageSender } from '../../../session/sending';
|
||||
import { PubKey } from '../../../session/types';
|
||||
import { MessageSender } from '../../../../session/sending';
|
||||
import { PubKey } from '../../../../session/types';
|
||||
|
||||
// tslint:disable-next-line: max-func-body-length
|
||||
describe('SessionProtocol', () => {
|
@ -1,24 +1,25 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import _ from 'lodash';
|
||||
import { GroupUtils, PromiseUtils } from '../../../session/utils';
|
||||
import { Stubs, TestUtils } from '../../../test/test-utils';
|
||||
import { MessageQueue } from '../../../session/sending/MessageQueue';
|
||||
import { describe } from 'mocha';
|
||||
|
||||
import { GroupUtils, PromiseUtils } from '../../../../session/utils';
|
||||
import { Stubs, TestUtils } from '../../../../test/test-utils';
|
||||
import { MessageQueue } from '../../../../session/sending/MessageQueue';
|
||||
import {
|
||||
ClosedGroupMessage,
|
||||
ContentMessage,
|
||||
OpenGroupMessage,
|
||||
} from '../../../session/messages/outgoing';
|
||||
import { PrimaryPubKey, PubKey, RawMessage } from '../../../session/types';
|
||||
import { UserUtil } from '../../../util';
|
||||
import { MessageSender } from '../../../session/sending';
|
||||
} from '../../../../session/messages/outgoing';
|
||||
import { PrimaryPubKey, PubKey, RawMessage } from '../../../../session/types';
|
||||
import { UserUtil } from '../../../../util';
|
||||
import { MessageSender } from '../../../../session/sending';
|
||||
import {
|
||||
MultiDeviceProtocol,
|
||||
SessionProtocol,
|
||||
} from '../../../session/protocols';
|
||||
import { PendingMessageCacheStub } from '../../test-utils/stubs';
|
||||
import { describe } from 'mocha';
|
||||
import { TestSyncMessage } from '../../test-utils/stubs/messages/TestSyncMessage';
|
||||
} from '../../../../session/protocols';
|
||||
import { PendingMessageCacheStub } from '../../../test-utils/stubs';
|
||||
import { TestSyncMessage } from '../../../test-utils/stubs/messages/TestSyncMessage';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
@ -1,10 +1,10 @@
|
||||
import { expect } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import * as _ from 'lodash';
|
||||
import { MessageUtils } from '../../../session/utils';
|
||||
import { TestUtils } from '../../../test/test-utils';
|
||||
import { PendingMessageCache } from '../../../session/sending/PendingMessageCache';
|
||||
import { SessionProtocol } from '../../../session/protocols';
|
||||
import { MessageUtils } from '../../../../session/utils';
|
||||
import { TestUtils } from '../../../../test/test-utils';
|
||||
import { PendingMessageCache } from '../../../../session/sending/PendingMessageCache';
|
||||
import { SessionProtocol } from '../../../../session/protocols';
|
||||
|
||||
// Equivalent to Data.StorageItem
|
||||
interface StorageItem {
|
@ -1,7 +1,7 @@
|
||||
import chai from 'chai';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { JobQueue } from '../../../session/utils/JobQueue';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { JobQueue } from '../../../../session/utils/JobQueue';
|
||||
import { TestUtils } from '../../../test-utils';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
@ -1,14 +1,14 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import crypto from 'crypto';
|
||||
import { TestUtils } from '../../test-utils/';
|
||||
import { MessageUtils } from '../../../session/utils/';
|
||||
import { EncryptionType, PubKey } from '../../../session/types/';
|
||||
import { SessionProtocol } from '../../../session/protocols';
|
||||
import { TestUtils } from '../../../test-utils';
|
||||
import { MessageUtils } from '../../../../session/utils';
|
||||
import { EncryptionType, PubKey } from '../../../../session/types';
|
||||
import { SessionProtocol } from '../../../../session/protocols';
|
||||
import {
|
||||
MediumGroupChatMessage,
|
||||
SessionRequestMessage,
|
||||
} from '../../../session/messages/outgoing';
|
||||
} from '../../../../session/messages/outgoing';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
@ -1,7 +1,7 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import { PromiseUtils } from '../../../session/utils/';
|
||||
import { PromiseUtils } from '../../../../session/utils';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
@ -1,11 +1,11 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import { SyncMessageUtils } from '../../../session/utils/';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { UserUtil } from '../../../util';
|
||||
import { MultiDeviceProtocol } from '../../../session/protocols';
|
||||
import { SyncMessage } from '../../../session/messages/outgoing';
|
||||
import { SyncMessageUtils } from '../../../../session/utils';
|
||||
import { TestUtils } from '../../../test-utils';
|
||||
import { UserUtil } from '../../../../util';
|
||||
import { MultiDeviceProtocol } from '../../../../session/protocols';
|
||||
import { SyncMessage } from '../../../../session/messages/outgoing';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
Loading…
Reference in New Issue