• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict'
2var test = require('tap').test
3var unsupported = require('../../lib/utils/unsupported.js')
4
5var versions = [
6  //          broken unsupported
7  ['v0.1.103', true, true],
8  ['v0.2.0', true, true],
9  ['v0.3.5', true, true],
10  ['v0.4.7', true, true],
11  ['v0.5.3', true, true],
12  ['v0.6.17', true, true],
13  ['v0.7.8', true, true],
14  ['v0.8.28', true, true],
15  ['v0.9.6', true, true],
16  ['v0.10.48', true, true],
17  ['v0.11.16', true, true],
18  ['v0.12.9', true, true],
19  ['v1.0.1', true, true],
20  ['v1.6.0', true, true],
21  ['v2.3.1', true, true],
22  ['v3.0.0', true, true],
23  ['v4.5.0', true, true],
24  ['v4.8.4', true, true],
25  ['v5.7.1', true, true],
26  ['v6.8.1', false, false],
27  ['v7.0.0-beta23', false, true],
28  ['v7.2.3', false, true],
29  ['v8.4.0', false, false],
30  ['v9.3.0', false, false],
31  ['v10.0.0-0', false, false],
32  ['v11.0.0-0', false, false],
33  ['v12.0.0-0', false, false],
34  ['v13.0.0-0', false, false]
35]
36
37test('versions', function (t) {
38  t.plan(versions.length * 2)
39  versions.forEach(function (verinfo) {
40    var version = verinfo[0]
41    var broken = verinfo[1]
42    var unsupp = verinfo[2]
43    var nodejs = unsupported.checkVersion(version)
44    t.is(nodejs.broken, broken, version + ' ' + (broken ? '' : 'not ') + 'broken')
45    t.is(nodejs.unsupported, unsupp, version + ' ' + (unsupp ? 'unsupported' : 'supported'))
46  })
47  t.done()
48})
49