0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/config/migrations/custom/ignore-npmrc-file-migration.spec.ts
2023-11-07 15:50:29 +00:00

39 lines
828 B
TypeScript

import { IgnoreNpmrcFileMigration } from './ignore-npmrc-file-migration';
describe('config/migrations/custom/ignore-npmrc-file-migration', () => {
it('should init npmrc field', () => {
expect(IgnoreNpmrcFileMigration).toMigrate(
{
ignoreNpmrcFile: true,
},
{
npmrc: '',
},
);
});
it('should not change npmrc field if it represents string value', () => {
expect(IgnoreNpmrcFileMigration).toMigrate(
{
ignoreNpmrcFile: true,
npmrc: '',
},
{
npmrc: '',
},
);
});
it('should change npmrc field if it not represents string value', () => {
expect(IgnoreNpmrcFileMigration).toMigrate(
{
ignoreNpmrcFile: true,
npmrc: true,
} as any,
{
npmrc: '',
},
);
});
});