chore(package): update ava to version 1.0.1
This commit is contained in:
		
							parent
							
								
									1aefd98d31
								
							
						
					
					
						commit
						3819ca56a9
					
				| @ -47,7 +47,7 @@ | |||||||
|     "yargs": "^12.0.0" |     "yargs": "^12.0.0" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "ava": "^0.25.0", |     "ava": "^1.0.1", | ||||||
|     "clear-module": "^3.0.0", |     "clear-module": "^3.0.0", | ||||||
|     "codecov": "^3.0.0", |     "codecov": "^3.0.0", | ||||||
|     "commitizen": "^3.0.0", |     "commitizen": "^3.0.0", | ||||||
|  | |||||||
| @ -480,7 +480,7 @@ test('Throw an Error if one of the shareable config cannot be found', async t => | |||||||
|   await outputJson(path.resolve(cwd, 'package.json'), {release: pkhOptions}); |   await outputJson(path.resolve(cwd, 'package.json'), {release: pkhOptions}); | ||||||
|   await outputJson(path.resolve(cwd, 'shareable1.json'), options1); |   await outputJson(path.resolve(cwd, 'shareable1.json'), options1); | ||||||
| 
 | 
 | ||||||
|   const error = await t.throws(t.context.getConfig({cwd}), Error); |   const error = await t.throwsAsync(t.context.getConfig({cwd}), Error); | ||||||
| 
 | 
 | ||||||
|   t.is(error.message, "Cannot find module 'non-existing-path'"); |   t.is(error.message, "Cannot find module 'non-existing-path'"); | ||||||
|   t.is(error.code, 'MODULE_NOT_FOUND'); |   t.is(error.code, 'MODULE_NOT_FOUND'); | ||||||
|  | |||||||
| @ -42,7 +42,7 @@ test('Throw error if the last commit sha cannot be found', async t => { | |||||||
|   // Create a git repository, set the current working directory at the root of the repo
 |   // Create a git repository, set the current working directory at the root of the repo
 | ||||||
|   const {cwd} = await gitRepo(); |   const {cwd} = await gitRepo(); | ||||||
| 
 | 
 | ||||||
|   await t.throws(getGitHead({cwd}), Error); |   await t.throwsAsync(getGitHead({cwd}), Error); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| test('Unshallow and fetch repository', async t => { | test('Unshallow and fetch repository', async t => { | ||||||
| @ -67,7 +67,7 @@ test('Do not throw error when unshallow a complete repository', async t => { | |||||||
|   const {cwd, repositoryUrl} = await gitRepo(); |   const {cwd, repositoryUrl} = await gitRepo(); | ||||||
|   // Add commits to the master branch
 |   // Add commits to the master branch
 | ||||||
|   await gitCommits(['First'], {cwd}); |   await gitCommits(['First'], {cwd}); | ||||||
|   await t.notThrows(fetch(repositoryUrl, {cwd})); |   await t.notThrowsAsync(fetch(repositoryUrl, {cwd})); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| test('Fetch all tags on a detached head repository', async t => { | test('Fetch all tags on a detached head repository', async t => { | ||||||
| @ -100,7 +100,7 @@ test('Verify if the commit `sha` is in the direct history of the current branch' | |||||||
| 
 | 
 | ||||||
|   t.true(await isRefInHistory(commits[0].hash, {cwd})); |   t.true(await isRefInHistory(commits[0].hash, {cwd})); | ||||||
|   t.falsy(await isRefInHistory(otherCommits[0].hash, {cwd})); |   t.falsy(await isRefInHistory(otherCommits[0].hash, {cwd})); | ||||||
|   await t.throws(isRefInHistory('non-existant-sha', {cwd})); |   await t.throwsAsync(isRefInHistory('non-existant-sha', {cwd})); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| test('Get the commit sha for a given tag or falsy if the tag does not exists', async t => { | test('Get the commit sha for a given tag or falsy if the tag does not exists', async t => { | ||||||
| @ -206,7 +206,7 @@ test('Return falsy for invalid tag names', async t => { | |||||||
| test('Throws error if obtaining the tags fails', async t => { | test('Throws error if obtaining the tags fails', async t => { | ||||||
|   const cwd = tempy.directory(); |   const cwd = tempy.directory(); | ||||||
| 
 | 
 | ||||||
|   await t.throws(getTags({cwd})); |   await t.throwsAsync(getTags({cwd})); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| test('Return "true" if repository is up to date', async t => { | test('Return "true" if repository is up to date', async t => { | ||||||
|  | |||||||
| @ -337,7 +337,7 @@ test('Call all "success" plugins even if one errors out', async t => { | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   await t.throws( |   await t.throwsAsync( | ||||||
|     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|   ); |   ); | ||||||
| 
 | 
 | ||||||
| @ -372,7 +372,7 @@ test('Log all "verifyConditions" errors', async t => { | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
|   const errors = [ |   const errors = [ | ||||||
|     ...(await t.throws( |     ...(await t.throwsAsync( | ||||||
|       semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |       semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|     )), |     )), | ||||||
|   ]; |   ]; | ||||||
| @ -417,7 +417,7 @@ test('Log all "verifyRelease" errors', async t => { | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
|   const errors = [ |   const errors = [ | ||||||
|     ...(await t.throws( |     ...(await t.throwsAsync( | ||||||
|       semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |       semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|     )), |     )), | ||||||
|   ]; |   ]; | ||||||
| @ -519,7 +519,7 @@ test('Dry-run skips fail', async t => { | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
|   const errors = [ |   const errors = [ | ||||||
|     ...(await t.throws( |     ...(await t.throwsAsync( | ||||||
|       semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |       semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|     )), |     )), | ||||||
|   ]; |   ]; | ||||||
| @ -957,7 +957,7 @@ test('Log both plugins errors and errors thrown by "fail" plugin', async t => { | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   await t.throws( |   await t.throwsAsync( | ||||||
|     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|   ); |   ); | ||||||
| 
 | 
 | ||||||
| @ -982,7 +982,7 @@ test('Call "fail" only if a plugin returns a SemanticReleaseError', async t => { | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   await t.throws( |   await t.throwsAsync( | ||||||
|     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|   ); |   ); | ||||||
| 
 | 
 | ||||||
| @ -999,7 +999,7 @@ test('Throw SemanticReleaseError if repositoryUrl is not set and cannot be found | |||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
|   const errors = [ |   const errors = [ | ||||||
|     ...(await t.throws( |     ...(await t.throwsAsync( | ||||||
|       semanticRelease({}, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) |       semanticRelease({}, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}) | ||||||
|     )), |     )), | ||||||
|   ]; |   ]; | ||||||
| @ -1036,7 +1036,7 @@ test('Throw an Error if plugin returns an unexpected value', async t => { | |||||||
|     './lib/get-logger': () => t.context.logger, |     './lib/get-logger': () => t.context.logger, | ||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
|   const error = await t.throws( |   const error = await t.throwsAsync( | ||||||
|     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}), |     semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}), | ||||||
|     Error |     Error | ||||||
|   ); |   ); | ||||||
| @ -1066,7 +1066,7 @@ test('Hide sensitive information passed to "fail" plugin', async t => { | |||||||
|     './lib/get-logger': () => t.context.logger, |     './lib/get-logger': () => t.context.logger, | ||||||
|     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), |     'env-ci': () => ({isCi: true, branch: 'master', isPr: false}), | ||||||
|   }); |   }); | ||||||
|   await t.throws( |   await t.throwsAsync( | ||||||
|     semanticRelease(options, {cwd, env, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}), |     semanticRelease(options, {cwd, env, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}), | ||||||
|     Error |     Error | ||||||
|   ); |   ); | ||||||
|  | |||||||
| @ -258,7 +258,7 @@ test('Exit with 1 if a plugin is not found', async t => { | |||||||
|     release: {analyzeCommits: 'non-existing-path', success: false, fail: false}, |     release: {analyzeCommits: 'non-existing-path', success: false, fail: false}, | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   const {code, stderr} = await t.throws(execa(cli, [], {env, cwd})); |   const {code, stderr} = await t.throwsAsync(execa(cli, [], {env, cwd})); | ||||||
|   t.is(code, 1); |   t.is(code, 1); | ||||||
|   t.regex(stderr, /Cannot find module/); |   t.regex(stderr, /Cannot find module/); | ||||||
| }); | }); | ||||||
| @ -276,7 +276,7 @@ test('Exit with 1 if a shareable config is not found', async t => { | |||||||
|     release: {extends: 'non-existing-path', success: false, fail: false}, |     release: {extends: 'non-existing-path', success: false, fail: false}, | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   const {code, stderr} = await t.throws(execa(cli, [], {env, cwd})); |   const {code, stderr} = await t.throwsAsync(execa(cli, [], {env, cwd})); | ||||||
|   t.is(code, 1); |   t.is(code, 1); | ||||||
|   t.regex(stderr, /Cannot find module/); |   t.regex(stderr, /Cannot find module/); | ||||||
| }); | }); | ||||||
| @ -297,7 +297,7 @@ test('Exit with 1 if a shareable config reference a not found plugin', async t = | |||||||
|   }); |   }); | ||||||
|   await writeJson(path.resolve(cwd, 'shareable.json'), shareable); |   await writeJson(path.resolve(cwd, 'shareable.json'), shareable); | ||||||
| 
 | 
 | ||||||
|   const {code, stderr} = await t.throws(execa(cli, [], {env, cwd})); |   const {code, stderr} = await t.throwsAsync(execa(cli, [], {env, cwd})); | ||||||
|   t.is(code, 1); |   t.is(code, 1); | ||||||
|   t.regex(stderr, /Cannot find module/); |   t.regex(stderr, /Cannot find module/); | ||||||
| }); | }); | ||||||
|  | |||||||
| @ -62,7 +62,7 @@ test('Wrap plugin in a function that add the "pluginName" to the error"', async | |||||||
|     './plugin-error': './test/fixtures', |     './plugin-error': './test/fixtures', | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   const error = await t.throws(plugin({options: {}})); |   const error = await t.throwsAsync(plugin({options: {}})); | ||||||
| 
 | 
 | ||||||
|   t.is(error.pluginName, './plugin-error'); |   t.is(error.pluginName, './plugin-error'); | ||||||
| }); | }); | ||||||
| @ -72,7 +72,7 @@ test('Wrap plugin in a function that add the "pluginName" to multiple errors"', | |||||||
|     './plugin-errors': './test/fixtures', |     './plugin-errors': './test/fixtures', | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   const errors = [...(await t.throws(plugin({options: {}})))]; |   const errors = [...(await t.throwsAsync(plugin({options: {}})))]; | ||||||
|   for (const error of errors) { |   for (const error of errors) { | ||||||
|     t.is(error.pluginName, './plugin-errors'); |     t.is(error.pluginName, './plugin-errors'); | ||||||
|   } |   } | ||||||
| @ -107,7 +107,7 @@ test('Wrap "analyzeCommits" plugin in a function that validate the output of the | |||||||
|     {} |     {} | ||||||
|   ); |   ); | ||||||
| 
 | 
 | ||||||
|   const error = await t.throws(plugin({options: {}})); |   const error = await t.throwsAsync(plugin({options: {}})); | ||||||
| 
 | 
 | ||||||
|   t.is(error.code, 'EANALYZECOMMITSOUTPUT'); |   t.is(error.code, 'EANALYZECOMMITSOUTPUT'); | ||||||
|   t.is(error.name, 'SemanticReleaseError'); |   t.is(error.name, 'SemanticReleaseError'); | ||||||
| @ -125,7 +125,7 @@ test('Wrap "generateNotes" plugin in a function that validate the output of the | |||||||
|     {} |     {} | ||||||
|   ); |   ); | ||||||
| 
 | 
 | ||||||
|   const error = await t.throws(plugin({options: {}})); |   const error = await t.throwsAsync(plugin({options: {}})); | ||||||
| 
 | 
 | ||||||
|   t.is(error.code, 'EGENERATENOTESOUTPUT'); |   t.is(error.code, 'EGENERATENOTESOUTPUT'); | ||||||
|   t.is(error.name, 'SemanticReleaseError'); |   t.is(error.name, 'SemanticReleaseError'); | ||||||
| @ -143,7 +143,7 @@ test('Wrap "publish" plugin in a function that validate the output of the plugin | |||||||
|     {} |     {} | ||||||
|   ); |   ); | ||||||
| 
 | 
 | ||||||
|   const error = await t.throws(plugin({options: {}})); |   const error = await t.throwsAsync(plugin({options: {}})); | ||||||
| 
 | 
 | ||||||
|   t.is(error.code, 'EPUBLISHOUTPUT'); |   t.is(error.code, 'EPUBLISHOUTPUT'); | ||||||
|   t.is(error.name, 'SemanticReleaseError'); |   t.is(error.name, 'SemanticReleaseError'); | ||||||
|  | |||||||
| @ -83,7 +83,7 @@ test('Stop execution and throw error if a step rejects', async t => { | |||||||
|   const step2 = stub().rejects(new Error('test error')); |   const step2 = stub().rejects(new Error('test error')); | ||||||
|   const step3 = stub().resolves(3); |   const step3 = stub().resolves(3); | ||||||
| 
 | 
 | ||||||
|   const error = await t.throws(pipeline([step1, step2, step3])(0), Error); |   const error = await t.throwsAsync(pipeline([step1, step2, step3])(0), Error); | ||||||
|   t.is(error.message, 'test error'); |   t.is(error.message, 'test error'); | ||||||
|   t.true(step1.calledWith(0)); |   t.true(step1.calledWith(0)); | ||||||
|   t.true(step2.calledWith(0)); |   t.true(step2.calledWith(0)); | ||||||
| @ -98,7 +98,7 @@ test('Throw all errors from the first step throwing an AggregateError', async t | |||||||
|   const step2 = stub().rejects(new AggregateError([error1, error2])); |   const step2 = stub().rejects(new AggregateError([error1, error2])); | ||||||
|   const step3 = stub().resolves(3); |   const step3 = stub().resolves(3); | ||||||
| 
 | 
 | ||||||
|   const errors = await t.throws(pipeline([step1, step2, step3])(0)); |   const errors = await t.throwsAsync(pipeline([step1, step2, step3])(0)); | ||||||
| 
 | 
 | ||||||
|   t.deepEqual([...errors], [error1, error2]); |   t.deepEqual([...errors], [error1, error2]); | ||||||
|   t.true(step1.calledWith(0)); |   t.true(step1.calledWith(0)); | ||||||
| @ -113,7 +113,7 @@ test('Execute all even if a Promise rejects', async t => { | |||||||
|   const step2 = stub().rejects(error1); |   const step2 = stub().rejects(error1); | ||||||
|   const step3 = stub().rejects(error2); |   const step3 = stub().rejects(error2); | ||||||
| 
 | 
 | ||||||
|   const errors = await t.throws(pipeline([step1, step2, step3], {settleAll: true})(0)); |   const errors = await t.throwsAsync(pipeline([step1, step2, step3], {settleAll: true})(0)); | ||||||
| 
 | 
 | ||||||
|   t.deepEqual([...errors], [error1, error2]); |   t.deepEqual([...errors], [error1, error2]); | ||||||
|   t.true(step1.calledWith(0)); |   t.true(step1.calledWith(0)); | ||||||
| @ -129,7 +129,7 @@ test('Throw all errors from all steps throwing an AggregateError', async t => { | |||||||
|   const step1 = stub().rejects(new AggregateError([error1, error2])); |   const step1 = stub().rejects(new AggregateError([error1, error2])); | ||||||
|   const step2 = stub().rejects(new AggregateError([error3, error4])); |   const step2 = stub().rejects(new AggregateError([error3, error4])); | ||||||
| 
 | 
 | ||||||
|   const errors = await t.throws(pipeline([step1, step2], {settleAll: true})(0)); |   const errors = await t.throwsAsync(pipeline([step1, step2], {settleAll: true})(0)); | ||||||
| 
 | 
 | ||||||
|   t.deepEqual([...errors], [error1, error2, error3, error4]); |   t.deepEqual([...errors], [error1, error2, error3, error4]); | ||||||
|   t.true(step1.calledWith(0)); |   t.true(step1.calledWith(0)); | ||||||
| @ -145,7 +145,7 @@ test('Execute each function in series passing a transformed input even if a step | |||||||
|   const step4 = stub().resolves(4); |   const step4 = stub().resolves(4); | ||||||
|   const getNextInput = (prevResult, result) => prevResult + result; |   const getNextInput = (prevResult, result) => prevResult + result; | ||||||
| 
 | 
 | ||||||
|   const errors = await t.throws(pipeline([step1, step2, step3, step4], {settleAll: true, getNextInput})(0)); |   const errors = await t.throwsAsync(pipeline([step1, step2, step3, step4], {settleAll: true, getNextInput})(0)); | ||||||
| 
 | 
 | ||||||
|   t.deepEqual([...errors], [error2, error3]); |   t.deepEqual([...errors], [error2, error3]); | ||||||
|   t.true(step1.calledWith(0)); |   t.true(step1.calledWith(0)); | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ test('Throw a AggregateError', async t => { | |||||||
|   const {cwd} = await gitRepo(); |   const {cwd} = await gitRepo(); | ||||||
|   const options = {}; |   const options = {}; | ||||||
| 
 | 
 | ||||||
|   const errors = [...(await t.throws(verify({cwd, options})))]; |   const errors = [...(await t.throwsAsync(verify({cwd, options})))]; | ||||||
| 
 | 
 | ||||||
|   t.is(errors[0].name, 'SemanticReleaseError'); |   t.is(errors[0].name, 'SemanticReleaseError'); | ||||||
|   t.is(errors[0].code, 'ENOREPOURL'); |   t.is(errors[0].code, 'ENOREPOURL'); | ||||||
| @ -27,7 +27,7 @@ test('Throw a SemanticReleaseError if does not run on a git repository', async t | |||||||
|   const cwd = tempy.directory(); |   const cwd = tempy.directory(); | ||||||
|   const options = {}; |   const options = {}; | ||||||
| 
 | 
 | ||||||
|   const errors = [...(await t.throws(verify({cwd, options})))]; |   const errors = [...(await t.throwsAsync(verify({cwd, options})))]; | ||||||
| 
 | 
 | ||||||
|   t.is(errors[0].name, 'SemanticReleaseError'); |   t.is(errors[0].name, 'SemanticReleaseError'); | ||||||
|   t.is(errors[0].code, 'ENOGITREPO'); |   t.is(errors[0].code, 'ENOGITREPO'); | ||||||
| @ -39,7 +39,7 @@ test('Throw a SemanticReleaseError if the "tagFormat" is not valid', async t => | |||||||
|   const {cwd, repositoryUrl} = await gitRepo(true); |   const {cwd, repositoryUrl} = await gitRepo(true); | ||||||
|   const options = {repositoryUrl, tagFormat: `?\${version}`}; |   const options = {repositoryUrl, tagFormat: `?\${version}`}; | ||||||
| 
 | 
 | ||||||
|   const errors = [...(await t.throws(verify({cwd, options})))]; |   const errors = [...(await t.throwsAsync(verify({cwd, options})))]; | ||||||
| 
 | 
 | ||||||
|   t.is(errors[0].name, 'SemanticReleaseError'); |   t.is(errors[0].name, 'SemanticReleaseError'); | ||||||
|   t.is(errors[0].code, 'EINVALIDTAGFORMAT'); |   t.is(errors[0].code, 'EINVALIDTAGFORMAT'); | ||||||
| @ -51,7 +51,7 @@ test('Throw a SemanticReleaseError if the "tagFormat" does not contains the "ver | |||||||
|   const {cwd, repositoryUrl} = await gitRepo(true); |   const {cwd, repositoryUrl} = await gitRepo(true); | ||||||
|   const options = {repositoryUrl, tagFormat: 'test'}; |   const options = {repositoryUrl, tagFormat: 'test'}; | ||||||
| 
 | 
 | ||||||
|   const errors = [...(await t.throws(verify({cwd, options})))]; |   const errors = [...(await t.throwsAsync(verify({cwd, options})))]; | ||||||
| 
 | 
 | ||||||
|   t.is(errors[0].name, 'SemanticReleaseError'); |   t.is(errors[0].name, 'SemanticReleaseError'); | ||||||
|   t.is(errors[0].code, 'ETAGNOVERSION'); |   t.is(errors[0].code, 'ETAGNOVERSION'); | ||||||
| @ -63,7 +63,7 @@ test('Throw a SemanticReleaseError if the "tagFormat" contains multiple "version | |||||||
|   const {cwd, repositoryUrl} = await gitRepo(true); |   const {cwd, repositoryUrl} = await gitRepo(true); | ||||||
|   const options = {repositoryUrl, tagFormat: `\${version}v\${version}`}; |   const options = {repositoryUrl, tagFormat: `\${version}v\${version}`}; | ||||||
| 
 | 
 | ||||||
|   const errors = [...(await t.throws(verify({cwd, options})))]; |   const errors = [...(await t.throwsAsync(verify({cwd, options})))]; | ||||||
| 
 | 
 | ||||||
|   t.is(errors[0].name, 'SemanticReleaseError'); |   t.is(errors[0].name, 'SemanticReleaseError'); | ||||||
|   t.is(errors[0].code, 'ETAGNOVERSION'); |   t.is(errors[0].code, 'ETAGNOVERSION'); | ||||||
| @ -75,5 +75,5 @@ test('Return "true" if all verification pass', async t => { | |||||||
|   const {cwd, repositoryUrl} = await gitRepo(true); |   const {cwd, repositoryUrl} = await gitRepo(true); | ||||||
|   const options = {repositoryUrl, tagFormat: `v\${version}`}; |   const options = {repositoryUrl, tagFormat: `v\${version}`}; | ||||||
| 
 | 
 | ||||||
|   await t.notThrows(verify({cwd, options})); |   await t.notThrowsAsync(verify({cwd, options})); | ||||||
| }); | }); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user