mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
style(metrics): remove unused imports and add eslint-disable for date string literals
Remove unused imports (SimpleMetrics, TODAY_STR, EMPTY, worklogService, workContextService) and add eslint-disable comment for naming-convention to allow date string object keys in tests.
This commit is contained in:
parent
13d7afc458
commit
312443db63
2 changed files with 3 additions and 5 deletions
|
|
@ -1,14 +1,13 @@
|
|||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { mapSimpleMetrics } from './metric.util';
|
||||
import { Worklog } from '../worklog/worklog.model';
|
||||
import { Task } from '../tasks/task.model';
|
||||
import { BreakNr, BreakTime } from '../work-context/work-context.model';
|
||||
import { SimpleMetrics } from './metric.model';
|
||||
import { createTask } from '../tasks/task.test-helper';
|
||||
import { getDbDateStr } from '../../util/get-db-date-str';
|
||||
|
||||
describe('metric.util', () => {
|
||||
describe('mapSimpleMetrics', () => {
|
||||
const TODAY_STR = '2025-01-16';
|
||||
const DAY_2025_01_15 = '2025-01-15';
|
||||
const TIMESTAMP_2025_01_15 = new Date('2025-01-15').getTime();
|
||||
const TIMESTAMP_2025_01_14 = new Date('2025-01-14').getTime();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { TestBed, fakeAsync, tick, flush } from '@angular/core/testing';
|
||||
import { ProjectMetricsService } from './project-metrics.service';
|
||||
import { TaskService } from '../tasks/task.service';
|
||||
import { ProjectService } from '../project/project.service';
|
||||
import { WorklogService } from '../worklog/worklog.service';
|
||||
import { WorkContextService } from '../work-context/work-context.service';
|
||||
import { BehaviorSubject, of, EMPTY } from 'rxjs';
|
||||
import { BehaviorSubject, of } from 'rxjs';
|
||||
import { WorkContextType } from '../work-context/work-context.model';
|
||||
import { createTask } from '../tasks/task.test-helper';
|
||||
import { Worklog } from '../worklog/worklog.model';
|
||||
|
|
@ -14,8 +15,6 @@ describe('ProjectMetricsService', () => {
|
|||
let service: ProjectMetricsService;
|
||||
let taskService: jasmine.SpyObj<TaskService>;
|
||||
let projectService: jasmine.SpyObj<ProjectService>;
|
||||
let worklogService: jasmine.SpyObj<WorklogService>;
|
||||
let workContextService: jasmine.SpyObj<WorkContextService>;
|
||||
let activeWorkContextTypeAndId$: BehaviorSubject<{
|
||||
activeType: WorkContextType | null;
|
||||
activeId: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue