Skip to content

Commit

Permalink
fix resetting workspace timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTugarev committed Dec 6, 2023
1 parent a93e35d commit 9afce3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ describe("PublicAPIConverter", () => {
});

describe("toDurationString", () => {
it("should convert with 0", () => {
expect(converter.toDurationString(new Duration())).to.equal("0");
expect(converter.toDurationString(new Duration({ seconds: BigInt(0) }))).to.equal("0");
expect(converter.toDurationString(new Duration({ nanos: 0 }))).to.equal("0");
it("should convert with empty string", () => {
expect(converter.toDurationString(new Duration())).to.equal("");
expect(converter.toDurationString(new Duration({ seconds: BigInt(0) }))).to.equal("");
expect(converter.toDurationString(new Duration({ nanos: 0 }))).to.equal("");
});
it("should convert with hours", () => {
expect(converter.toDurationString(new Duration({ seconds: BigInt(3600) }))).to.equal("1h");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ export class PublicAPIConverter {
toDurationString(duration?: PartialMessage<Duration>): string {
const seconds = duration?.seconds || 0;
if (seconds === 0) {
return "0";
return "";
}
const totalMilliseconds = Number(seconds) * 1000;

Expand Down

0 comments on commit 9afce3a

Please sign in to comment.