mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Added more tests + Update src/extensions/extension-discovery/is-compatible-extension/is-compatible-extension.ts
Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com>
This commit is contained in:
parent
2a9c5f8137
commit
e1d6c0183d
@ -32,6 +32,18 @@ describe("Extension/App versions compatibility check", () => {
|
|||||||
})(getExtensionManifestMock({
|
})(getExtensionManifestMock({
|
||||||
lensEngine: "5.5.0",
|
lensEngine: "5.5.0",
|
||||||
}))).toBeTruthy();
|
}))).toBeTruthy();
|
||||||
|
|
||||||
|
expect(isCompatibleExtension({
|
||||||
|
appSemVer: semver.coerce("5.5.0-alpha.0"),
|
||||||
|
})(getExtensionManifestMock({
|
||||||
|
lensEngine: "^5.5.0",
|
||||||
|
}))).toBeTruthy();
|
||||||
|
|
||||||
|
expect(isCompatibleExtension({
|
||||||
|
appSemVer: semver.coerce("5.5"),
|
||||||
|
})(getExtensionManifestMock({
|
||||||
|
lensEngine: "^5.6.0",
|
||||||
|
}))).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("is not compatible with upper %MAJOR version of base app", () => {
|
it("is not compatible with upper %MAJOR version of base app", () => {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export const isCompatibleExtension = ({ appSemVer }: Dependencies): ((manifest:
|
|||||||
if (!validVersion) {
|
if (!validVersion) {
|
||||||
const errorInfo = [
|
const errorInfo = [
|
||||||
`Invalid format for "manifest.engines.lens"="${manifestLensEngine}"`,
|
`Invalid format for "manifest.engines.lens"="${manifestLensEngine}"`,
|
||||||
`Range versions could be specified only starting with '^'.`,
|
`Range versions can only be specified starting with '^'.`,
|
||||||
`Otherwise it's recommended to use plain %MAJOR.%MINOR to match with supported Lens version.`,
|
`Otherwise it's recommended to use plain %MAJOR.%MINOR to match with supported Lens version.`,
|
||||||
].join("\n");
|
].join("\n");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user