Hello all I am new in testing, I am just trying to test async storage value, it's set to 25 as you see;
This is test I have written;
test('can read asyncstorage', async () => { let val = await AsyncStorage.getItem('isFirst'); expect(val).toBe('25');});
The error I am getting is that;
expect(received).toBe(expected) // Object.is equality Expected: "25" Received: null
Or did I just misunderstood the concept of writing tests? should I set 25 with mocked setItem just before calling getItem? Thank you.
Versions I use
"typescript": "^3.9.10""@types/react-native": "^0.64.10","@types/react-test-renderer": "^16.9.5",