1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-01 19:15:01 +02:00

Tools: Trying to fix TaskService test on CI

This commit is contained in:
Laurent Cozic 2021-09-19 15:05:30 +01:00
parent 56be4d59f4
commit 72e58ee195
2 changed files with 1 additions and 4 deletions

View File

@ -69,9 +69,8 @@ describe('TaskService', function() {
expect(service.taskState('test').lastCompletionTime).toBeFalsy();
expect(service.taskState('test').lastRunTime.getTime()).toBeGreaterThanOrEqual(startTime.getTime());
await msleep(1);
finishTask = true;
await msleep(3);
await msleep(10);
expect(taskHasRan).toBe(true);
expect(service.taskState('test').running).toBe(false);

View File

@ -63,8 +63,6 @@ export default class TaskService extends BaseService {
return this.taskStates_[id];
}
// TODO: add tests
public async runTask(id: TaskId, runType: RunType) {
const state = this.taskState(id);
if (state.running) throw new Error(`Task is already running: ${id}`);