backward compatibility with old images format

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-04-28 09:08:21 +02:00
parent a5680a6642
commit 2f4dd1462a
7 changed files with 80 additions and 27 deletions

View File

@ -16,6 +16,22 @@ describe('transform', () => {
] as Image[],
false
],
[
[
`name/foo,name/bar`
],
[
{
name: `name/foo`,
enable: true,
},
{
name: `name/bar`,
enable: true,
}
] as Image[],
false
],
[
[
`name/foo`,
@ -66,6 +82,9 @@ describe('transform', () => {
],
[
[`name=,enable=true`], undefined, true
],
[
[`name/foo,name=name/bar,enable=true`], undefined, true
]
])('given %p', async (l: string[], expected: Image[], invalid: boolean) => {
try {