4NK_wallet/tests/store.test.ts
Your Name a189470d49
Some checks failed
CI - 4NK Node / Integration Tests (push) Failing after 9s
CI - 4NK Node / Docker Build & Test (push) Failing after 8s
CI - 4NK Node / Documentation Tests (push) Failing after 3s
CI - 4NK Node / Release Guard (push) Has been skipped
CI - 4NK Node / Performance Tests (push) Failing after 29s
CI - 4NK Node / Code Quality (push) Failing after 32s
CI - 4NK Node / Unit Tests (push) Failing after 30s
CI - 4NK Node / Security Tests (push) Failing after 28s
CI - 4NK Node / Notify (push) Failing after 1s
chore(template-sync): aligner avec 4NK_template (.cursor/.gitea/.gitea_template/scripts/ignores)
2025-08-27 11:37:12 +02:00

18 lines
528 B
TypeScript

import { store, setTokens, setLastMessageType } from '@/store';
describe('store', () => {
test('setTokens', () => {
store.dispatch(setTokens({ accessToken: 'x', refreshToken: 'y' }));
const state = store.getState();
expect(state.bridge.accessToken).toBe('x');
expect(state.bridge.refreshToken).toBe('y');
});
test('setLastMessageType', () => {
store.dispatch(setLastMessageType('LISTENING'));
const state = store.getState();
expect(state.bridge.lastMessageType).toBe('LISTENING');
});
});