2016-09-21 06:27:11 -08:00
|
|
|
/* eslint-disable prefer-arrow-callback */
|
2016-08-03 11:39:58 -08:00
|
|
|
require('../setup');
|
|
|
|
|
|
|
|
|
|
const {_toDependencies} = require('../../app/plugins');
|
|
|
|
|
|
|
|
|
|
describe('plugins', function () {
|
|
|
|
|
describe('#toDependencies()', function () {
|
|
|
|
|
it('should convert dependencies form hyperterm\'s format to npm\'s', function () {
|
|
|
|
|
const plugins = ['project1', 'project2#1.0.0', 'project3@beta',
|
|
|
|
|
'@org1/project4#1.0.0', '@org2/project5@alpha',
|
|
|
|
|
'@org3/project6'];
|
|
|
|
|
|
2016-09-21 06:27:11 -08:00
|
|
|
_toDependencies({plugins}).should.be.eql({
|
2016-08-03 11:39:58 -08:00
|
|
|
'project1': 'latest',
|
|
|
|
|
'project2': '1.0.0',
|
|
|
|
|
'project3': 'beta',
|
|
|
|
|
'@org1/project4': '1.0.0',
|
|
|
|
|
'@org2/project5': 'alpha',
|
|
|
|
|
'@org3/project6': 'latest'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|