Skip to content

Commit f28d474

Browse files
committed
make fmt
1 parent 97adb66 commit f28d474

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

site/src/pages/WorkspaceSettingsPage/WorkspaceSchedulePage/schedule.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe("scheduleChanged", () => {
5151
expect(scheduleChanged(autostop, formValues)).toBe(true);
5252
});
5353
it("should be true if ttl values are different", () => {
54-
const autostop = { autostopEnabled: true, ttl: 1000, ttl_bump: emptyTTL};
54+
const autostop = { autostopEnabled: true, ttl: 1000, ttl_bump: emptyTTL };
5555
const formValues = {
5656
autostartEnabled: false,
5757
...emptySchedule,
@@ -62,7 +62,7 @@ describe("scheduleChanged", () => {
6262
expect(scheduleChanged(autostop, formValues)).toBe(true);
6363
});
6464
it("should be true if ttl_bump values are different", () => {
65-
const autostop = { autostopEnabled: true, ttl: 1000, ttl_bump: emptyTTL};
65+
const autostop = { autostopEnabled: true, ttl: 1000, ttl_bump: emptyTTL };
6666
const formValues = {
6767
autostartEnabled: false,
6868
...emptySchedule,
@@ -73,7 +73,7 @@ describe("scheduleChanged", () => {
7373
expect(scheduleChanged(autostop, formValues)).toBe(true);
7474
});
7575
it("should be false if all autostop values are the same", () => {
76-
const autostop = { autostopEnabled: true, ttl: 1000, ttl_bump: emptyTTL};
76+
const autostop = { autostopEnabled: true, ttl: 1000, ttl_bump: emptyTTL };
7777
const formValues = {
7878
autostartEnabled: false,
7979
...emptySchedule,

site/src/pages/WorkspaceSettingsPage/WorkspaceSchedulePage/ttl.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ export const emptyTTL = 0;
88

99
const msToHours = (ms: number) => Math.round(ms / (1000 * 60 * 60));
1010

11-
export const ttlMsToAutostop = (ttl_ms?: number, ttl_bump_ms?:number): Autostop =>
11+
export const ttlMsToAutostop = (
12+
ttl_ms?: number,
13+
ttl_bump_ms?: number,
14+
): Autostop =>
1215
ttl_ms
13-
? { autostopEnabled: true, ttl: msToHours(ttl_ms), ttl_bump: msToHours(ttl_bump_ms || 0) }
16+
? {
17+
autostopEnabled: true,
18+
ttl: msToHours(ttl_ms),
19+
ttl_bump: msToHours(ttl_bump_ms || 0),
20+
}
1421
: { autostopEnabled: false, ttl: 0, ttl_bump: msToHours(ttl_bump_ms || 0) };

0 commit comments

Comments
 (0)