diff --git a/config.json b/config.json index 02da541c16..e3086dacc8 100644 --- a/config.json +++ b/config.json @@ -255,6 +255,14 @@ "concepts": ["classes"], "prerequisites": ["objects", "functions", "conditionals-ternary"], "status": "beta" + }, + { + "slug": "appointment-time", + "name": "Appointment Time", + "uuid": "0f694053-a388-457f-89ca-f49be4560469", + "concepts": ["dates"], + "prerequisites": ["classes", "conditionals"], + "status": "beta" } ], "practice": [ diff --git a/exercises/concept/appointment-time/.npmrc b/exercises/concept/appointment-time/.npmrc new file mode 100644 index 0000000000..d26df800bb --- /dev/null +++ b/exercises/concept/appointment-time/.npmrc @@ -0,0 +1 @@ +audit=false diff --git a/exercises/concept/appointment-time/LICENSE b/exercises/concept/appointment-time/LICENSE new file mode 100644 index 0000000000..90e73be03b --- /dev/null +++ b/exercises/concept/appointment-time/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Exercism + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/exercises/concept/appointment-time/appointment-time.spec.js b/exercises/concept/appointment-time/appointment-time.spec.js index 6bdd106b9e..33826bbe67 100644 --- a/exercises/concept/appointment-time/appointment-time.spec.js +++ b/exercises/concept/appointment-time/appointment-time.spec.js @@ -8,13 +8,13 @@ import { describe('createAppointment', () => { test('creates appointment of 4 days later', () => { - expect(createAppointment(4)).toBe( + expect(createAppointment(4)).toEqual( new Date(Date.now() + 4 * 24 * 3600 * 1000) ); }); test('creates appointment of 124 days later', () => { - expect(createAppointment(124)).toBe( + expect(createAppointment(124)).toEqual( new Date(Date.now() + 124 * 24 * 3600 * 1000) ); });