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" ) , "08:00 am" ) ;
9+ test ( "can correctly convert morning time" , function ( ) {
10+ assert . equal ( formatAs12HourClock ( "08:00" ) , "08:00 am" ) ;
1111} ) ;
1212
13- test ( "can correctly convert midnight " , function ( ) {
14-
15- assert . equal ( formatAs12HourClock ( "24:00" ) , "12:00 am" )
13+ test ( "can correctly convert midnight " , function ( ) {
14+ assert . equal ( formatAs12HourClock ( "24:00" ) , "12:00 am" ) ;
1615} ) ;
1716
18- test ( "can correctly convert midday " , function ( ) {
19- assert . equal ( formatAs12HourClock ( "12:00" ) , "12:00 pm" )
20-
21- } )
22-
23- test ( "can correctly convert time with minutes " , function ( ) {
24- assert . equal ( formatAs12HourClock ( "12:45" ) , "12:45 pm" )
17+ test ( "can correctly convert midday " , function ( ) {
18+ assert . equal ( formatAs12HourClock ( "12:00" ) , "12:00 pm" ) ;
19+ } ) ;
2520
26- } )
21+ test ( "can correctly convert time with minutes " , function ( ) {
22+ assert . equal ( formatAs12HourClock ( "12:45" ) , "12:45 pm" ) ;
23+ } ) ;
2724
28- test ( "can correctly convert time the end of midnight" , function ( ) {
29- assert . equal ( formatAs12HourClock ( "00:59" ) , "12:59 am" )
30- } )
25+ test ( "can correctly convert time the end of midnight" , function ( ) {
26+ assert . equal ( formatAs12HourClock ( "00:59" ) , "12:59 am" ) ;
27+ } ) ;
0 commit comments