summaryrefslogtreecommitdiffstats
path: root/node_modules/saslprep/test/util.js
blob: 355db3f85e8ef143c524c9eed428f76dc1fdfba1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict';

const { setFlagsFromString } = require('v8');
const { range } = require('../lib/util');

// 984 by default.
setFlagsFromString('--stack_size=500');

test('should work', () => {
  const list = range(1, 3);
  expect(list).toEqual([1, 2, 3]);
});

test('should work for large ranges', () => {
  expect(() => range(1, 1e6)).not.toThrow();
});