Skip to content

Commit

Permalink
chore(utils-test): remove unneeded test
Browse files Browse the repository at this point in the history
for getting files with the old syntax.
code was removed some commits ago
  • Loading branch information
hulkoba authored and Realtin committed Jul 4, 2019
1 parent d1ac456 commit be97ff9
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion test/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const {
addNodeVersionToTravisYML,
addNewLowestAndDeprecate,
hasNodeVersion,
getLockfilePath
getLockfilePath,
getLicenseAndAuthorFromVersions
} = require('../../utils/utils')

const { cleanCache } = require('../helpers/module-cache-helpers')
Expand Down Expand Up @@ -260,6 +261,39 @@ test('getOldVersionResolved', () => {
expect(output).toEqual('9.3.1')
})

test('getLicenseAndAuthorFromVersions', () => {
const version = '2.2.2'
const oldVersionResolved = '1.1.1'
const versions = {
'1.1.1': {
'repository': {
'type': 'git',
'url': 'git+https://github.com/cat/cat.git'
},
'license': 'MIT',
'_npmUser': {
name: 'finn',
email: '[email protected]'
},
'2.2.2': {
'repository': {
'type': 'git',
'url': 'git+https://github.com/best/best.git'
},
'license': 'MIT',
'_npmUser': {
name: 'finn',
email: '[email protected]'
}
}
}
}
const output = getLicenseAndAuthorFromVersions({ versions, version, oldVersionResolved })
console.log('### output', output)
// returns the last satisfying version
expect(output).toEqual('9.3.1')
})

test('Use default env.GITHUB_URL in github compare URL', () => {
const fullName = 'hanshansen/mopeds'
const branch = 'master'
Expand Down

0 comments on commit be97ff9

Please sign in to comment.