Skip to content

Commit

Permalink
Updating tests for gigasecond (#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdish-15 authored Jan 11, 2025
1 parent e61ab87 commit 3c5415e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions exercises/practice/gigasecond/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"contributors": [
"ankorGH",
"draalger",
"jagdish-15",
"kytrinyx",
"matthewmorgan",
"paparomeo",
Expand Down
16 changes: 13 additions & 3 deletions exercises/practice/gigasecond/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[92fbe71c-ea52-4fac-bd77-be38023cacf7]
description = "date only specification of time"
Expand All @@ -16,3 +23,6 @@ description = "full time specified"

[09d4e30e-728a-4b52-9005-be44a58d9eba]
description = "full time with day roll-over"

[fcec307c-7529-49ab-b0fe-20309197618a]
description = "does not mutate the input"
4 changes: 2 additions & 2 deletions exercises/practice/gigasecond/gigasecond.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('Gigasecond', () => {
});

xtest('does not mutate the input', () => {
const input = new Date(Date.UTC(2020, 0, 4, 20, 28, 30));
const input = new Date(Date.UTC(2015, 1, 24, 23, 59, 59));
gigasecond(input);
expect(input).toEqual(new Date(Date.UTC(2020, 0, 4, 20, 28, 30)));
expect(input).toEqual(new Date(Date.UTC(2015, 1, 24, 23, 59, 59)));
});
});

0 comments on commit 3c5415e

Please sign in to comment.