TuitioState's token property can be null
parent
7fcb55dbc7
commit
95d41e9361
|
@ -36,4 +36,5 @@ All tests in the package can be executed by running: `npm test`.
|
|||
1.0.0 - Package initialization
|
||||
1.0.1 - Export Tuitio types
|
||||
1.0.2 - Validate that Tuitio's URL parameter is a valid URL
|
||||
1.0.3 - Added LICENSE file
|
||||
1.0.3 - Added LICENSE file
|
||||
1.0.4 - TuitioState's token property can be null
|
||||
|
|
|
@ -24,7 +24,7 @@ test("Tuitio client authentication", async () => {
|
|||
expect(result.status).toBe("_MOCK_");
|
||||
|
||||
const storage = fetch();
|
||||
expect(storage.token.raw).toBe("mock-user-pass");
|
||||
expect(storage.token?.raw).toBe("mock-user-pass");
|
||||
expect(storage.userName).toBe("user");
|
||||
|
||||
invalidate();
|
||||
|
|
|
@ -58,7 +58,7 @@ const invalidate = (): void => {
|
|||
}
|
||||
};
|
||||
|
||||
export type TuitioState = { token: TuitioToken; userName: string };
|
||||
export type TuitioState = { token: TuitioToken | null; userName: string };
|
||||
|
||||
const fetch = (): TuitioState => {
|
||||
const data = {
|
||||
|
|
Loading…
Reference in New Issue