mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
fix(supported-versions): nightly build matrix tag (#152)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { unifyNextPackageName } from "./unify-next-package-name";
|
||||
|
||||
describe('unifyNextPackageName', () => {
|
||||
it('should do nothing to an unknown package', () => {
|
||||
expect(unifyNextPackageName('test', 'https://repo.mage-os.org', new Date())).toEqual('test');
|
||||
});
|
||||
|
||||
it('should do nothing to a next-available package at a non-next version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('magento/product-community-edition:v2.4.5-p1', 'https://repo.mage-os.org', new Date())
|
||||
)
|
||||
.toEqual('magento/product-community-edition:v2.4.5-p1');
|
||||
});
|
||||
|
||||
it('should do nothing to a next package at a next version on a repo that doesnt support that version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('magento/product-community-edition:next', 'https://repo.mage-os.org', new Date())
|
||||
).toEqual('magento/product-community-edition:next');
|
||||
});
|
||||
|
||||
it('should convert the next version to the specific format of the repo that supports the next version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('magento/product-community-edition:next', 'https://upstream-nightly.mage-os.org', new Date())
|
||||
).toEqual('magento/product-community-edition:@alpha');
|
||||
});
|
||||
|
||||
it('should convert the next version to the specific format of the repo that supports the next version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('mage-os/product-community-edition:next', 'https://nightly.mage-os.org', new Date())
|
||||
).toEqual('mage-os/product-community-edition:@alpha');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user