100% coverage
All checks were successful
Distribution check / Generated files check (push) Successful in -2m3s
NPM Audit Check / Check NPM audit (push) Successful in -2m10s
Unit tests / Unit tests (latest) (push) Successful in -2m2s
Unit tests / Unit tests (lts/*) (push) Successful in -2m1s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -2m1s

This commit is contained in:
2025-11-05 18:22:00 -05:00
parent 68e0d8ecc6
commit 0befd7b090
2 changed files with 79 additions and 0 deletions

View File

@@ -22,6 +22,25 @@ describe('pkgbase parser', () => {
await expect(parse(path.join('test', 'resources', rDir, 'pkgbase.old.yaml'), path.join('test', 'resources', rDir, 'pkgbase.new.yaml'))).resolves.toEqual(expected);
});
it('can detect an add operation on a new repo', async () => {
const expected: Result = {
build: true,
move: false,
delete: [],
actions: {
addRepo: 'world',
removeRepo: null,
triggersBuild: true,
triggersRebuild: false,
triggersRepoAdd: true,
triggersRepoRemove: false,
triggersNoCheck: false
}
};
const rDir = 'add-new';
await expect(parse(path.join('test', 'resources', rDir, 'pkgbase.old.yaml'), path.join('test', 'resources', rDir, 'pkgbase.new.yaml'))).resolves.toEqual(expected);
});
it('can remove dangling packages in an add operation', async () => {
const expected: Result = {
build: true,