tuitio token fix
parent
495c5c79c9
commit
e972a5ea01
|
@ -24,10 +24,12 @@ test("Tuitio client authentication", async () => {
|
|||
expect(result.status).toBe("_MOCK_");
|
||||
|
||||
const storage = fetch();
|
||||
expect(storage.token.raw).toBe("mock-user-pass");
|
||||
expect(storage.userName).toBe("user");
|
||||
|
||||
invalidate();
|
||||
const emptyStorage = fetch();
|
||||
expect(emptyStorage.token).toBeNull();
|
||||
expect(emptyStorage.userName).toBeNull();
|
||||
});
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ const invalidate = (): void => {
|
|||
}
|
||||
};
|
||||
|
||||
export type TuitioState = { token: string; userName: string };
|
||||
export type TuitioState = { token: TuitioToken; userName: string };
|
||||
|
||||
const fetch = (): TuitioState => {
|
||||
const data = {
|
||||
|
|
Loading…
Reference in New Issue