fix: Typo in error messages
This commit is contained in:
		
							parent
							
								
									d7b323dd00
								
							
						
					
					
						commit
						613a646363
					
				@ -38,7 +38,7 @@ module.exports = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    output: {
 | 
					    output: {
 | 
				
			||||||
      validator: output => !output || RELEASE_TYPE.includes(output),
 | 
					      validator: output => !output || RELEASE_TYPE.includes(output),
 | 
				
			||||||
      message: 'The "analyzeCommits" plugin output must be either undefined or a valid semver release type.',
 | 
					      message: 'The "analyzeCommits" plugin output, if defined, must be a valid semver release type.',
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  verifyRelease: {
 | 
					  verifyRelease: {
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,7 @@ module.exports = (pluginType, pluginConfig, logger, validator) => {
 | 
				
			|||||||
    const result = await func(cloneDeep(input));
 | 
					    const result = await func(cloneDeep(input));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (validator && !validator.validator(result)) {
 | 
					    if (validator && !validator.validator(result)) {
 | 
				
			||||||
      throw new Error(`${validator.message}. Received: ${inspect(result)}`);
 | 
					      throw new Error(`${validator.message} Received: ${inspect(result)}`);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
				
			|||||||
@ -40,7 +40,7 @@ test('Wrap plugin in a function that validate the output of the plugin', async t
 | 
				
			|||||||
  const pluginFunction = stub().resolves(1);
 | 
					  const pluginFunction = stub().resolves(1);
 | 
				
			||||||
  const plugin = normalize('', pluginFunction, t.context.logger, {
 | 
					  const plugin = normalize('', pluginFunction, t.context.logger, {
 | 
				
			||||||
    validator: output => output === 1,
 | 
					    validator: output => output === 1,
 | 
				
			||||||
    message: 'The output must be 1',
 | 
					    message: 'The output must be 1.',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  await t.notThrows(plugin());
 | 
					  await t.notThrows(plugin());
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user