Test against Node 22

This commit is contained in:
Steve Gravrock
2024-06-18 18:13:11 -07:00
parent 5c21f94bb1
commit c3960c4a96
3 changed files with 22 additions and 2 deletions

View File

@@ -179,7 +179,10 @@ describe('base helpers', function() {
f2 = jasmine.createSpy('setTimeout callback for ' + (max + 1));
// Suppress printing of TimeoutOverflowWarning in node
spyOn(console, 'error');
if (typeof process !== 'undefined' && process.emitWarning) {
spyOn(process, 'emitWarning'); // Node 22
}
spyOn(console, 'error'); // Node <22
let id = setTimeout(f1, max);
setTimeout(function() {