From 95852d800202ecc09d4488dee372fa69fff1087c Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 11 Oct 2023 11:37:41 +1100 Subject: [PATCH] refactor: remove duplicate test libsession_wrapper_test.ts --- .../libsession_wrapper_user_profile.ts | 26 ------------------- ...> libsession_wrapper_user_profile_test.ts} | 0 2 files changed, 26 deletions(-) delete mode 100644 ts/test/session/unit/libsession_wrapper/libsession_wrapper_user_profile.ts rename ts/test/session/unit/libsession_wrapper/{libsession_wrapper_test.ts => libsession_wrapper_user_profile_test.ts} (100%) diff --git a/ts/test/session/unit/libsession_wrapper/libsession_wrapper_user_profile.ts b/ts/test/session/unit/libsession_wrapper/libsession_wrapper_user_profile.ts deleted file mode 100644 index 1af72e7fc..000000000 --- a/ts/test/session/unit/libsession_wrapper/libsession_wrapper_user_profile.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable no-unused-expressions */ -import { expect } from 'chai'; -import Sinon from 'sinon'; - -import { SessionUtilUserProfile } from '../../../../session/utils/libsession/libsession_utils_user_profile'; -import { UserUtils } from '../../../../session/utils'; -import { TestUtils } from '../../../test-utils'; - -describe('libsession_wrapper', () => { - afterEach(() => { - Sinon.restore(); - }); - - it('isUserProfileToStoreInWrapper returns true if thats our convo', () => { - const us = TestUtils.generateFakePubKeyStr(); - Sinon.stub(UserUtils, 'getOurPubKeyStrFromCache').returns(us); - expect(SessionUtilUserProfile.isUserProfileToStoreInWrapper(us)).to.be.true; - }); - - it('isUserProfileToStoreInWrapper returns false if thats NOT our convo', () => { - const us = TestUtils.generateFakePubKeyStr(); - const notUs = TestUtils.generateFakePubKeyStr(); - Sinon.stub(UserUtils, 'getOurPubKeyStrFromCache').returns(us); - expect(SessionUtilUserProfile.isUserProfileToStoreInWrapper(notUs)).to.be.false; - }); -}); diff --git a/ts/test/session/unit/libsession_wrapper/libsession_wrapper_test.ts b/ts/test/session/unit/libsession_wrapper/libsession_wrapper_user_profile_test.ts similarity index 100% rename from ts/test/session/unit/libsession_wrapper/libsession_wrapper_test.ts rename to ts/test/session/unit/libsession_wrapper/libsession_wrapper_user_profile_test.ts