mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Show changes working by removing no longer required empty props objects
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
ee11098d7a
commit
cf13233a35
@ -34,7 +34,7 @@ export const installFromInput = ({
|
||||
|
||||
try {
|
||||
// fixme: improve error messages for non-tar-file URLs
|
||||
if (InputValidators.isUrl.validate(input, {})) {
|
||||
if (InputValidators.isUrl.validate(input)) {
|
||||
// install via url
|
||||
disposer = extensionInstallationStateStore.startPreInstall();
|
||||
const { promise } = downloadFile({ url: input, timeout: 10 * 60 * 1000 });
|
||||
@ -44,7 +44,7 @@ export const installFromInput = ({
|
||||
}
|
||||
|
||||
try {
|
||||
await InputValidators.isPath.validate(input, {});
|
||||
await InputValidators.isPath.validate(input);
|
||||
|
||||
// install from system path
|
||||
const fileName = path.basename(input);
|
||||
|
||||
@ -21,7 +21,7 @@ describe("input validation tests", () => {
|
||||
];
|
||||
|
||||
it.each(tests)("validate %s", (input, output) => {
|
||||
expect(isEmail.validate(input, {})).toBe(output);
|
||||
expect(isEmail.validate(input)).toBe(output);
|
||||
});
|
||||
});
|
||||
|
||||
@ -38,7 +38,7 @@ describe("input validation tests", () => {
|
||||
];
|
||||
|
||||
it.each(cases)("validate %s", (input, output) => {
|
||||
expect(isUrl.validate(input, {})).toBe(output);
|
||||
expect(isUrl.validate(input)).toBe(output);
|
||||
});
|
||||
});
|
||||
|
||||
@ -68,7 +68,7 @@ describe("input validation tests", () => {
|
||||
];
|
||||
|
||||
it.each(tests)("validate %s", (input, output) => {
|
||||
expect(systemName.validate(input, {})).toBe(output);
|
||||
expect(systemName.validate(input)).toBe(output);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -162,7 +162,7 @@ export const systemName = inputValidator({
|
||||
|
||||
export const accountId = inputValidator({
|
||||
message: () => `Invalid account ID`,
|
||||
validate: (value, props) => (isEmail.validate(value, props) || systemName.validate(value, props)),
|
||||
validate: (value) => (isEmail.validate(value) || systemName.validate(value)),
|
||||
});
|
||||
|
||||
export const conditionalValidators = [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user