mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-31 01:37:24 +00:00
2fc46bdcfa
* test(manager): replace file snapshots with explicit assertions * test(manager): replace inline snapshots with explicit assertions * test(manager): assert on relevant sections instead of full bodies * test(manager): drop assertions implied by full equality * test(manager): address review feedback * test(manager): assert depType and versioning in the regex matcher
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import { Fixtures } from '~test/fixtures.ts';
|
|
import { extractPackageFile } from './index.ts';
|
|
|
|
describe('modules/manager/cdnurl/extract', () => {
|
|
it('extractPackageFile', () => {
|
|
expect(extractPackageFile(Fixtures.get(`sample.txt`))).toMatchObject({
|
|
deps: [
|
|
{
|
|
currentValue: '15.6.1',
|
|
depName: 'prop-types',
|
|
packageName: 'prop-types/prop-types.min.js',
|
|
},
|
|
{
|
|
currentValue: '16.3.2',
|
|
depName: 'react',
|
|
packageName: 'react/umd/react.production.min.js',
|
|
},
|
|
{
|
|
currentValue: '16.3.2',
|
|
depName: 'react-dom',
|
|
packageName: 'react-dom/umd/react-dom.production.min.js',
|
|
},
|
|
{
|
|
currentValue: '2.2.1',
|
|
depName: 'react-transition-group',
|
|
packageName: 'react-transition-group/react-transition-group.min.js',
|
|
},
|
|
{
|
|
currentValue: '1.14.3',
|
|
depName: 'popper.js',
|
|
packageName: 'popper.js/umd/popper.min.js',
|
|
},
|
|
{
|
|
currentValue: '0.10.4',
|
|
depName: 'react-popper',
|
|
packageName: 'react-popper/umd/react-popper.min.js',
|
|
},
|
|
{
|
|
currentValue: '7.1.0',
|
|
depName: 'reactstrap',
|
|
packageName: 'reactstrap/reactstrap.min.js',
|
|
},
|
|
{
|
|
currentValue: '4.3.1',
|
|
depName: 'react-router',
|
|
packageName: 'react-router/react-router.min.js',
|
|
},
|
|
{
|
|
currentValue: '4.0.6',
|
|
depName: 'react-markdown',
|
|
packageName: 'react-markdown/react-markdown.js',
|
|
},
|
|
{
|
|
currentValue: '0.18.0',
|
|
depName: 'axios',
|
|
packageName: 'axios/axios.min.js',
|
|
},
|
|
],
|
|
});
|
|
});
|
|
});
|