|
1 | | -import {formatAs12HourClock} from "./timeConverter.js"; |
| 1 | +import { formatAs12HourClock } from "./timeConverter.js"; |
2 | 2 | import assert from "node:assert"; |
3 | 3 | import test from "node:test"; |
4 | 4 |
|
5 | | -test("correctly convert time afternoon time: 23:00", function(){ |
6 | | - assert.equal(formatAs12HourClock("23:00"), "11:00pm"); |
| 5 | +test("correctly convert time afternoon time: 23:00", function () { |
| 6 | + assert.equal(formatAs12HourClock("23:00"), "11:00pm"); |
7 | 7 | }); |
8 | 8 |
|
9 | | -test("can correctly convert morning time 08:00", function() { |
10 | | - assert.equal(formatAs12HourClock("08:00"), "8:00am"); |
| 9 | +test("can correctly convert morning time 08:00", function () { |
| 10 | + assert.equal(formatAs12HourClock("08:00"), "8:00am"); |
11 | 11 | }); |
12 | 12 |
|
13 | | -test("can correctly convert morning time 11:59", function() { |
14 | | - assert.equal(formatAs12HourClock("11:59"), "11:59am"); |
| 13 | +test("can correctly convert morning time 11:59", function () { |
| 14 | + assert.equal(formatAs12HourClock("11:59"), "11:59am"); |
15 | 15 | }); |
16 | 16 |
|
17 | | - test("can correctly convert afternoon time 23:59", function() { |
18 | | - assert.equal(formatAs12HourClock("23:159"), "11:59pm"); |
| 17 | +test("can correctly convert afternoon time 23:59", function () { |
| 18 | + assert.equal(formatAs12HourClock("23:159"), "11:59pm"); |
19 | 19 | }); |
20 | 20 |
|
21 | | -test("can correctly convert morning time 00:00", function() { |
22 | | - assert.equal(formatAs12HourClock("00:00"), "12:00am"); |
| 21 | +test("can correctly convert morning time 00:00", function () { |
| 22 | + assert.equal(formatAs12HourClock("00:00"), "12:00am"); |
23 | 23 | }); |
24 | 24 |
|
25 | | -test("can correctly convert afternoon time 12:00", function() { |
26 | | - assert.equal(formatAs12HourClock("12:00"), "12:00pm"); |
| 25 | +test("can correctly convert afternoon time 12:00", function () { |
| 26 | + assert.equal(formatAs12HourClock("12:00"), "12:00pm"); |
27 | 27 | }); |
28 | | - |
29 | | - |
30 | | - |
0 commit comments