From 4c6dee9d757adc688631e889c9d0a74044f8cdb9 Mon Sep 17 00:00:00 2001 From: Jagdish Prajapati Date: Sat, 11 Jan 2025 17:27:37 +0530 Subject: [PATCH] Updating tests for gigasecond --- exercises/practice/gigasecond/.meta/config.json | 1 + exercises/practice/gigasecond/.meta/tests.toml | 16 +++++++++++++--- exercises/practice/gigasecond/gigasecond.spec.js | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/exercises/practice/gigasecond/.meta/config.json b/exercises/practice/gigasecond/.meta/config.json index 7ea6e58d14..3f378534c5 100644 --- a/exercises/practice/gigasecond/.meta/config.json +++ b/exercises/practice/gigasecond/.meta/config.json @@ -5,6 +5,7 @@ "contributors": [ "ankorGH", "draalger", + "jagdish-15", "kytrinyx", "matthewmorgan", "paparomeo", diff --git a/exercises/practice/gigasecond/.meta/tests.toml b/exercises/practice/gigasecond/.meta/tests.toml index 18672327f3..a7caf00dbc 100644 --- a/exercises/practice/gigasecond/.meta/tests.toml +++ b/exercises/practice/gigasecond/.meta/tests.toml @@ -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" @@ -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" diff --git a/exercises/practice/gigasecond/gigasecond.spec.js b/exercises/practice/gigasecond/gigasecond.spec.js index 6fd9e31854..f107c3ec5e 100644 --- a/exercises/practice/gigasecond/gigasecond.spec.js +++ b/exercises/practice/gigasecond/gigasecond.spec.js @@ -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))); }); });