Skip to content

Commit be97ff9

Browse files
hulkobaRealtin
authored andcommitted
chore(utils-test): remove unneeded test
for getting files with the old syntax. code was removed some commits ago
1 parent d1ac456 commit be97ff9

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

test/utils/utils.js

+35-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const {
1010
addNodeVersionToTravisYML,
1111
addNewLowestAndDeprecate,
1212
hasNodeVersion,
13-
getLockfilePath
13+
getLockfilePath,
14+
getLicenseAndAuthorFromVersions
1415
} = require('../../utils/utils')
1516

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

264+
test('getLicenseAndAuthorFromVersions', () => {
265+
const version = '2.2.2'
266+
const oldVersionResolved = '1.1.1'
267+
const versions = {
268+
'1.1.1': {
269+
'repository': {
270+
'type': 'git',
271+
'url': 'git+https://github.com/cat/cat.git'
272+
},
273+
'license': 'MIT',
274+
'_npmUser': {
275+
name: 'finn',
276+
email: 'finn.pauls@gmail.com'
277+
},
278+
'2.2.2': {
279+
'repository': {
280+
'type': 'git',
281+
'url': 'git+https://github.com/best/best.git'
282+
},
283+
'license': 'MIT',
284+
'_npmUser': {
285+
name: 'finn',
286+
email: 'finn.pauls@gmail.com'
287+
}
288+
}
289+
}
290+
}
291+
const output = getLicenseAndAuthorFromVersions({ versions, version, oldVersionResolved })
292+
console.log('### output', output)
293+
// returns the last satisfying version
294+
expect(output).toEqual('9.3.1')
295+
})
296+
263297
test('Use default env.GITHUB_URL in github compare URL', () => {
264298
const fullName = 'hanshansen/mopeds'
265299
const branch = 'master'

0 commit comments

Comments
 (0)