0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-12 23:51:55 +00:00
renovatebot_renovate/lib/config/migrations/custom/go-mod-tidy-migration.spec.ts
Michael Kriese 997c23502e
test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +00:00

35 lines
782 B
TypeScript

import { GoModTidyMigration } from './go-mod-tidy-migration';
describe('config/migrations/custom/go-mod-tidy-migration', () => {
it('should add postUpdateOptions option when true', () => {
expect(GoModTidyMigration).toMigrate(
{
gomodTidy: true,
postUpdateOptions: ['test'],
},
{
postUpdateOptions: ['test', 'gomodTidy'],
},
);
});
it('should handle case when postUpdateOptions is not defined', () => {
expect(GoModTidyMigration).toMigrate(
{
gomodTidy: true,
},
{
postUpdateOptions: ['gomodTidy'],
},
);
});
it('should only remove when false', () => {
expect(GoModTidyMigration).toMigrate(
{
gomodTidy: false,
},
{},
);
});
});