TuitioState's token property can be null
parent
7fcb55dbc7
commit
95d41e9361
|
@ -37,3 +37,4 @@ All tests in the package can be executed by running: `npm test`.
|
||||||
1.0.1 - Export Tuitio types
|
1.0.1 - Export Tuitio types
|
||||||
1.0.2 - Validate that Tuitio's URL parameter is a valid URL
|
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_");
|
expect(result.status).toBe("_MOCK_");
|
||||||
|
|
||||||
const storage = fetch();
|
const storage = fetch();
|
||||||
expect(storage.token.raw).toBe("mock-user-pass");
|
expect(storage.token?.raw).toBe("mock-user-pass");
|
||||||
expect(storage.userName).toBe("user");
|
expect(storage.userName).toBe("user");
|
||||||
|
|
||||||
invalidate();
|
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 fetch = (): TuitioState => {
|
||||||
const data = {
|
const data = {
|
||||||
|
|
Loading…
Reference in New Issue