Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
test: elect build leader
Browse files Browse the repository at this point in the history
  • Loading branch information
boennemann authored and gr2m committed Aug 19, 2017
1 parent bd850b1 commit f8e16ae
Show file tree
Hide file tree
Showing 3 changed files with 4,550 additions and 912 deletions.
33 changes: 33 additions & 0 deletions __tests__/elect-build-leader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const test = require('ava')

const electBuildLeader = require('../elect-build-leader')

test('find highest node version in build matrix', t => {
t.is(electBuildLeader('1'), 1, 'no matrix')

t.is(electBuildLeader([
'8',
'4',
'1',
'node',
'0.1',
'lts',
'argon',
'0.10',
'8.4',
'4.0.1'
]), 4, 'latest stable')

t.is(electBuildLeader([
'8',
'4',
'1',
'>=3',
'0.1',
'lts',
'argon',
'0.10',
'8.4',
'4.0.1'
]), 9, 'version range')
})
Loading

0 comments on commit f8e16ae

Please sign in to comment.