@@ -47,7 +47,7 @@ test('Skip npm auth verification if "npmPublish" is false', async t => {
47
47
const pkg = { name : 'published' , version : '1.0.0' , publishConfig : { registry : npmRegistry . url } } ;
48
48
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
49
49
50
- await t . notThrows (
50
+ await t . notThrowsAsync (
51
51
t . context . m . verifyConditions (
52
52
{ npmPublish : false } ,
53
53
{ cwd, env, options : { } , stdout : t . context . stdout , stderr : t . context . stderr , logger : t . context . logger }
@@ -60,7 +60,7 @@ test('Skip npm auth verification if "package.private" is true', async t => {
60
60
const pkg = { name : 'published' , version : '1.0.0' , publishConfig : { registry : npmRegistry . url } , private : true } ;
61
61
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
62
62
63
- await t . notThrows (
63
+ await t . notThrowsAsync (
64
64
t . context . m . verifyConditions (
65
65
{ npmPublish : false } ,
66
66
{
@@ -79,7 +79,7 @@ test('Skip npm token verification if "package.private" is true', async t => {
79
79
const cwd = tempy . directory ( ) ;
80
80
const pkg = { name : 'published' , version : '1.0.0' , publishConfig : { registry : npmRegistry . url } , private : true } ;
81
81
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
82
- await t . notThrows (
82
+ await t . notThrowsAsync (
83
83
t . context . m . verifyConditions (
84
84
{ } ,
85
85
{
@@ -100,7 +100,7 @@ test('Throws error if NPM token is invalid', async t => {
100
100
const pkg = { name : 'published' , version : '1.0.0' , publishConfig : { registry : npmRegistry . url } } ;
101
101
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
102
102
103
- const [ error ] = await t . throws (
103
+ const [ error ] = await t . throwsAsync (
104
104
t . context . m . verifyConditions (
105
105
{ } ,
106
106
{ cwd, env, options : { } , stdout : t . context . stdout , stderr : t . context . stderr , logger : t . context . logger }
@@ -120,7 +120,7 @@ test('Skip Token validation if the registry configured is not the default one',
120
120
const env = { NPM_TOKEN : 'wrong_token' } ;
121
121
const pkg = { name : 'published' , version : '1.0.0' , publishConfig : { registry : 'http://custom-registry.com/' } } ;
122
122
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
123
- await t . notThrows (
123
+ await t . notThrowsAsync (
124
124
t . context . m . verifyConditions (
125
125
{ } ,
126
126
{ cwd, env, options : { } , stdout : t . context . stdout , stderr : t . context . stderr , logger : t . context . logger }
@@ -135,7 +135,7 @@ test('Verify npm auth and package', async t => {
135
135
const cwd = tempy . directory ( ) ;
136
136
const pkg = { name : 'valid-token' , version : '0.0.0-dev' , publishConfig : { registry : npmRegistry . url } } ;
137
137
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
138
- await t . notThrows (
138
+ await t . notThrowsAsync (
139
139
t . context . m . verifyConditions (
140
140
{ } ,
141
141
{
@@ -158,7 +158,7 @@ test('Verify npm auth and package from a sub-directory', async t => {
158
158
const cwd = tempy . directory ( ) ;
159
159
const pkg = { name : 'valid-token' , version : '0.0.0-dev' , publishConfig : { registry : npmRegistry . url } } ;
160
160
await outputJson ( path . resolve ( cwd , 'dist/package.json' ) , pkg ) ;
161
- await t . notThrows (
161
+ await t . notThrowsAsync (
162
162
t . context . m . verifyConditions (
163
163
{ pkgRoot : 'dist' } ,
164
164
{
@@ -181,7 +181,7 @@ test('Verify npm auth and package with "npm_config_registry" env var set by yarn
181
181
const cwd = tempy . directory ( ) ;
182
182
const pkg = { name : 'valid-token' , version : '0.0.0-dev' , publishConfig : { registry : npmRegistry . url } } ;
183
183
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
184
- await t . notThrows (
184
+ await t . notThrowsAsync (
185
185
t . context . m . verifyConditions (
186
186
{ } ,
187
187
{
@@ -208,7 +208,7 @@ test('Throw SemanticReleaseError Array if config option are not valid in verifyC
208
208
const tarballDir = 42 ;
209
209
const pkgRoot = 42 ;
210
210
const errors = [
211
- ...( await t . throws (
211
+ ...( await t . throwsAsync (
212
212
t . context . m . verifyConditions (
213
213
{ } ,
214
214
{
@@ -332,7 +332,7 @@ test('Create the package and skip publish ("npmPublish" is false)', async t => {
332
332
t . false ( result ) ;
333
333
t . is ( ( await readJson ( path . resolve ( cwd , 'package.json' ) ) ) . version , '1.0.0' ) ;
334
334
t . true ( await pathExists ( path . resolve ( cwd , `tarball/${ pkg . name } -1.0.0.tgz` ) ) ) ;
335
- await t . throws ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
335
+ await t . throwsAsync ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
336
336
} ) ;
337
337
338
338
test ( 'Create the package and skip publish ("package.private" is true)' , async t => {
@@ -357,7 +357,7 @@ test('Create the package and skip publish ("package.private" is true)', async t
357
357
t . false ( result ) ;
358
358
t . is ( ( await readJson ( path . resolve ( cwd , 'package.json' ) ) ) . version , '1.0.0' ) ;
359
359
t . true ( await pathExists ( path . resolve ( cwd , `tarball/${ pkg . name } -1.0.0.tgz` ) ) ) ;
360
- await t . throws ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
360
+ await t . throwsAsync ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
361
361
} ) ;
362
362
363
363
test ( 'Create the package and skip publish from a sub-directory ("npmPublish" is false)' , async t => {
@@ -382,7 +382,7 @@ test('Create the package and skip publish from a sub-directory ("npmPublish" is
382
382
t . false ( result ) ;
383
383
t . is ( ( await readJson ( path . resolve ( cwd , 'dist/package.json' ) ) ) . version , '1.0.0' ) ;
384
384
t . true ( await pathExists ( path . resolve ( cwd , `tarball/${ pkg . name } -1.0.0.tgz` ) ) ) ;
385
- await t . throws ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
385
+ await t . throwsAsync ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
386
386
} ) ;
387
387
388
388
test ( 'Create the package and skip publish from a sub-directory ("package.private" is true)' , async t => {
@@ -412,7 +412,7 @@ test('Create the package and skip publish from a sub-directory ("package.private
412
412
t . false ( result ) ;
413
413
t . is ( ( await readJson ( path . resolve ( cwd , 'dist/package.json' ) ) ) . version , '1.0.0' ) ;
414
414
t . true ( await pathExists ( path . resolve ( cwd , `tarball/${ pkg . name } -1.0.0.tgz` ) ) ) ;
415
- await t . throws ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
415
+ await t . throwsAsync ( execa ( 'npm' , [ 'view' , pkg . name , 'version' ] , { cwd, env : testEnv } ) ) ;
416
416
} ) ;
417
417
418
418
test ( 'Throw SemanticReleaseError Array if config option are not valid in publish' , async t => {
@@ -424,7 +424,7 @@ test('Throw SemanticReleaseError Array if config option are not valid in publish
424
424
const pkgRoot = 42 ;
425
425
426
426
const errors = [
427
- ...( await t . throws (
427
+ ...( await t . throwsAsync (
428
428
t . context . m . publish (
429
429
{ npmPublish, tarballDir, pkgRoot} ,
430
430
{
@@ -505,7 +505,7 @@ test('Throw SemanticReleaseError Array if config option are not valid in prepare
505
505
const pkgRoot = 42 ;
506
506
507
507
const errors = [
508
- ...( await t . throws (
508
+ ...( await t . throwsAsync (
509
509
t . context . m . prepare (
510
510
{ npmPublish, tarballDir, pkgRoot} ,
511
511
{
@@ -537,7 +537,7 @@ test('Verify token and set up auth only on the fist call, then prepare on prepar
537
537
const pkg = { name : 'test-module' , version : '0.0.0-dev' , publishConfig : { registry : npmRegistry . url } } ;
538
538
await outputJson ( path . resolve ( cwd , 'package.json' ) , pkg ) ;
539
539
540
- await t . notThrows (
540
+ await t . notThrowsAsync (
541
541
t . context . m . verifyConditions (
542
542
{ } ,
543
543
{ cwd, env, options : { } , stdout : t . context . stdout , stderr : t . context . stderr , logger : t . context . logger }
0 commit comments