You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					17 lines
				
				433 B
			
		
		
			
		
	
	
					17 lines
				
				433 B
			| 
											3 years ago
										 | // empty around comma
 | ||
|  | 
 | ||
|  | var test = require('tap').test; | ||
|  | var CronDate = require('../lib/date'); | ||
|  | 
 | ||
|  | test('is the last weekday of the month', function (t) { | ||
|  |   // Last monday of septhember
 | ||
|  |   var date = new CronDate(new Date(2021, 8, 27)); | ||
|  |   t.equal(date.isLastWeekdayOfMonth(), true); | ||
|  | 
 | ||
|  |   // Second-to-last monday of septhember
 | ||
|  |   var date = new CronDate(new Date(2021, 8, 20)); | ||
|  |   t.equal(date.isLastWeekdayOfMonth(), false); | ||
|  | 
 | ||
|  |   t.end(); | ||
|  | }); |