Skip to content

Commit

Permalink
If in old node, mark all as slow
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 22, 2024
1 parent da48b12 commit ac72a1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion javascript/euler.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const chai = require('chai');
const expect = chai.expect;
const Mathematics = require('./src/lib/math.js');
const Utilities = require('./src/lib/utils.js');
const oldNodeJs = typeof process !== 'undefined' &&
process.version &&
process.version.match(/^v(\d+)/)[1] <= 15 &&
typeof window === 'undefined';

describe('Data Files', ()=>{
it('Should be able to fetch files as utf8', function() {
Expand Down Expand Up @@ -59,7 +63,7 @@ for (question in answers) {
describe(`Problem ${formattedQuestion}`, ()=>{
it(`Should equal ${answer}`, function() {
if (typeof this.timeout !== 'undefined') {
if (isSlow) {
if (isSlow || oldNodeJs) {
this.timeout(Infinity);
} else {
this.timeout(60 * 1000);
Expand Down

0 comments on commit ac72a1c

Please sign in to comment.