0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-02-28 18:44:03 +00:00
renovatebot_renovate/lib/modules/datasource/buildpacks-registry/schema.spec.ts
Ralf Pannemans d581af59bc
feat(datasource): Add datasource for buildpack registry (#32721)
Co-authored-by: Nicolas Bender <nicolas.bender@sap.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-28 16:31:07 +00:00

43 lines
1.2 KiB
TypeScript

import { BuildpacksRegistryResponseSchema } from './schema';
describe('modules/datasource/buildpacks-registry/schema', () => {
it('parses buildpack-registry schema', () => {
const response = {
latest: {
version: '0.17.1',
namespace: 'heroku',
name: 'python',
description: "Heroku's buildpack for Python applications.",
homepage: 'https://github.com/heroku/buildpacks-python',
licenses: ['BSD-3-Clause'],
stacks: ['*'],
id: '75946bf8-3f6a-4af0-a757-614bebfdfcd6',
},
versions: [
{
version: '0.2.0',
_link:
'https://registry.buildpacks.io//api/v1/buildpacks/heroku/python/0.2.0',
},
{
version: '0.1.0',
_link:
'https://registry.buildpacks.io//api/v1/buildpacks/heroku/python/0.1.0',
},
],
};
expect(BuildpacksRegistryResponseSchema.parse(response)).toMatchObject({
latest: {
homepage: 'https://github.com/heroku/buildpacks-python',
},
versions: [
{
version: '0.2.0',
},
{
version: '0.1.0',
},
],
});
});
});