Skip to content

Commit

Permalink
added test to selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
eniolam1000752 committed Jun 3, 2022
1 parent 6ed0b14 commit a608838
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
11 changes: 6 additions & 5 deletions setup/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ module.exports = {
rootDir: '../',
modulePaths: ['src/modules'],
testMatch: [
'<rootDir>/src/**/*.test.js',
'<rootDir>/app/src/**/*.test.js',
'<rootDir>/setup/**/*.test.js',
'<rootDir>/tests/**/*.test.js',
'<rootDir>/libs/**/*.test.js',
'<rootDir>/src/**/AddAccountForm.test.js',
// '<rootDir>/src/**/*.test.js',
// '<rootDir>/app/src/**/*.test.js',
// '<rootDir>/setup/**/*.test.js',
// '<rootDir>/tests/**/*.test.js',
// '<rootDir>/libs/**/*.test.js',
],
testPathIgnorePatterns: [
'<rootDir>/test/integration/wallet.test.js',
Expand Down
9 changes: 9 additions & 0 deletions src/modules/account/store/selectors.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import mockSavedAccounts from '@tests/fixtures/accounts';
import { selectCurrentAccount } from './selectors';

describe('Auth middleware', () => {
it('Should return accountSchema if setCurrentAccount action type is tiggered', async () => {
const state = { account: { current: mockSavedAccounts[0] } };
expect(selectCurrentAccount(state)).toEqual(mockSavedAccounts[0]);
});
});
1 change: 1 addition & 0 deletions src/modules/account/utils/decryptionAccount.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* istanbul ignore file */
// eslint-disable-next-line
export const decryptionAccount = (accountSchema, password) => {
// TODO implement this function in ticket #4299
Expand Down
1 change: 1 addition & 0 deletions src/modules/account/utils/encryptionAccount.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* istanbul ignore file */
const mockAccount = {
crypto: {
kdf: 'argon2id',
Expand Down

0 comments on commit a608838

Please sign in to comment.