1- import { formatAs12HourClock } from "./timeConverter.js" ;
1+ import { formatAs12HourClock } from "./timeConverter.js" ;
22import assert from "node:assert" ;
33import test from "node:test" ;
44
5- test ( "correctly convert time after 12:00" , function ( ) {
6- assert . equal ( formatAs12HourClock ( "23:00" ) , "11:00 pm" ) ;
5+ test ( "correctly convert time after 12:00" , function ( ) {
6+ assert . equal ( formatAs12HourClock ( "23:00" ) , "11:00 pm" ) ;
77} ) ;
88
9- test ( "can correctly convert morning time" , function ( ) {
10- assert . equal ( formatAs12HourClock ( "08:00" ) , "8:00 am" ) ;
9+ test ( "can correctly convert morning time" , function ( ) {
10+ assert . equal ( formatAs12HourClock ( "08:00" ) , "8:00 am" ) ;
1111} ) ;
1212
13- test ( "can correctly convert midnight time" , function ( ) {
14- assert . equal ( formatAs12HourClock ( "00:00" ) , "12:00 am" ) ;
13+ test ( "can correctly convert midnight time" , function ( ) {
14+ assert . equal ( formatAs12HourClock ( "00:00" ) , "12:00 am" ) ;
1515} ) ;
1616
17- test ( "can correctly convert single character hour morning time" , function ( ) {
18- assert . equal ( formatAs12HourClock ( "09:00" ) , "9:00 am" ) ;
17+ test ( "can correctly convert single character hour morning time" , function ( ) {
18+ assert . equal ( formatAs12HourClock ( "09:00" ) , "9:00 am" ) ;
1919} ) ;
2020
21- test ( "can correctly convert dual characters hour morning time" , function ( ) {
22- assert . equal ( formatAs12HourClock ( "11:00" ) , "11:00 am" ) ;
21+ test ( "can correctly convert dual characters hour morning time" , function ( ) {
22+ assert . equal ( formatAs12HourClock ( "11:00" ) , "11:00 am" ) ;
2323} ) ;
2424
25- test ( "can correctly convert noon time" , function ( ) {
26- assert . equal ( formatAs12HourClock ( "12:00" ) , "12:00 pm" ) ;
25+ test ( "can correctly convert noon time" , function ( ) {
26+ assert . equal ( formatAs12HourClock ( "12:00" ) , "12:00 pm" ) ;
2727} ) ;
2828
29- test ( "can correctly shows minutes input" , function ( ) {
30- assert . equal ( formatAs12HourClock ( "16:59" ) , "4:59 pm" ) ;
31- } ) ;
29+ test ( "can correctly shows minutes input" , function ( ) {
30+ assert . equal ( formatAs12HourClock ( "16:59" ) , "4:59 pm" ) ;
31+ } ) ;
0 commit comments