Pipe statsig events to logger (#7141)

* Pipe statsig events to logger

* Log rich objects to bitdrift

* Fix tests

* Consolidate mocks, fix tests

* Reduce log trash on native
This commit is contained in:
dan
2024-12-17 12:22:09 +00:00
committed by GitHub
parent 07b7250682
commit 32611391a3
7 changed files with 46 additions and 26 deletions
@@ -4,25 +4,12 @@ import {describe, expect, it, jest} from '@jest/globals'
import {agentToSessionAccountOrThrow} from '../agent'
import {Action, getInitialState, reducer, State} from '../reducer'
jest.mock('statsig-react-native-expo', () => ({
Statsig: {
initialize() {},
initializeCalled() {
return false
},
},
}))
jest.mock('jwt-decode', () => ({
jwtDecode(_token: string) {
return {}
},
}))
jest.mock('expo-localization', () => ({
getLocales: () => [],
}))
describe('session', () => {
it('can log in and out', () => {
let state = getInitialState([])