Web Worker Sign Out and Use Go API (#13)
* Calculate checksum and send with file upload * Limit file upload and display rejected file error * Add sign in timeout * Check auth token structure before setting Clean up * Use web worker timer to sign out Remove checksum Point to Go ota update * Remove checksum dependency
This commit is contained in:
12
src/services/__mocks__/timer.js
Normal file
12
src/services/__mocks__/timer.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const timer = {
|
||||
start: jest.fn(),
|
||||
stop: jest.fn(),
|
||||
onMessage: jest.fn(),
|
||||
terminate: jest.fn()
|
||||
}
|
||||
|
||||
const getTimerWorker = () => {
|
||||
return timer;
|
||||
}
|
||||
|
||||
export default getTimerWorker;
|
||||
@@ -11,7 +11,7 @@ export const getCancelToken = () => {
|
||||
return issuedCancelToken;
|
||||
}
|
||||
|
||||
export const uploadFile = async (file, token, onProgress, cancelToken) => {
|
||||
export const uploadFile = async (file, token, onProgress, cancelToken, hash) => {
|
||||
if (!uploadFileDelay) return uploadFileResponse;
|
||||
onProgress(50);
|
||||
await delay(10000);
|
||||
|
||||
Reference in New Issue
Block a user