@@ -638,6 +638,36 @@ describe("Cronstrue", function () {
638
638
} ) ;
639
639
} ) ;
640
640
641
+ describe ( "@ expressions" , function ( ) {
642
+ it ( "@yearly" , function ( ) {
643
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "At 12:00 AM, on day 1 of the month, only in January" ) ;
644
+ } ) ;
645
+
646
+ it ( "@annually" , function ( ) {
647
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "At 12:00 AM, on day 1 of the month, only in January" ) ;
648
+ } ) ;
649
+
650
+ it ( "@monthly" , function ( ) {
651
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "At 12:00 AM, on day 1 of the month" ) ;
652
+ } ) ;
653
+
654
+ it ( "@weekly" , function ( ) {
655
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "At 12:00 AM, only on Sunday" ) ;
656
+ } ) ;
657
+
658
+ it ( "@daily" , function ( ) {
659
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "At 12:00 AM" ) ;
660
+ } ) ;
661
+
662
+ it ( "@midnight" , function ( ) {
663
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "At 12:00 AM" ) ;
664
+ } ) ;
665
+
666
+ it ( "@hourly" , function ( ) {
667
+ assert . equal ( cronstrue . toString ( this . test ?. title as string ) , "Every hour" ) ;
668
+ } ) ;
669
+ } ) ;
670
+
641
671
describe ( "verbose" , function ( ) {
642
672
it ( "30 4 1 * *" , function ( ) {
643
673
assert . equal ( cronstrue . toString ( this . test ?. title as string , { verbose : true } ) , "At 04:30 AM, on day 1 of the month" ) ;
0 commit comments