@@ -57,7 +57,7 @@ t.test('edit', async t => {
5757  const  {  npm }  =  await  loadMockNpm ( t ) 
5858  await  t . rejects ( 
5959    npm . exec ( 'access' ,  [ 'edit' ,  '@scoped/another' ] ) , 
60-     / e d i t   s u b c o m m a n d   i s   n o t   i m p l e m e n t e d   y e t / , 
60+     / e d i t   s u b c o m m a n d   i s   n o t   i m p l e m e n t e d / , 
6161    'should throw not implemented yet error' 
6262  ) 
6363} ) 
@@ -79,7 +79,7 @@ t.test('access public on unscoped package', async t => {
7979
8080t . test ( 'access public on scoped package' ,  async  t  =>  { 
8181  const  name  =  '@scoped/npm-access-public-pkg' 
82-   const  {  npm,  joinedOutput }  =  await  loadMockNpm ( t ,  { 
82+   const  {  npm,  joinedOutput,  logs  }  =  await  loadMockNpm ( t ,  { 
8383    config : { 
8484      ...auth , 
8585    } , 
@@ -94,6 +94,7 @@ t.test('access public on scoped package', async t => {
9494  } ) 
9595  registry . access ( {  spec : name ,  access : 'public'  } ) 
9696  await  npm . exec ( 'access' ,  [ 'public' ] ) 
97+   t . match ( logs . warn [ 0 ] ,  [ 'access' ,  'public subcommand will be removed in the next version of npm' ] ) 
9798  t . equal ( joinedOutput ( ) ,  '' ) 
9899} ) 
99100
@@ -137,7 +138,7 @@ t.test('access restricted on unscoped package', async t => {
137138
138139t . test ( 'access restricted on scoped package' ,  async  t  =>  { 
139140  const  name  =  '@scoped/npm-access-restricted-pkg' 
140-   const  {  npm,  joinedOutput }  =  await  loadMockNpm ( t ,  { 
141+   const  {  npm,  joinedOutput,  logs  }  =  await  loadMockNpm ( t ,  { 
141142    config : { 
142143      ...auth , 
143144    } , 
@@ -152,6 +153,7 @@ t.test('access restricted on scoped package', async t => {
152153  } ) 
153154  registry . access ( {  spec : name ,  access : 'restricted'  } ) 
154155  await  npm . exec ( 'access' ,  [ 'restricted' ] ) 
156+   t . match ( logs . warn [ 0 ] ,  [ 'access' ,  'restricted subcommand will be removed in the next version of npm' ] ) 
155157  t . equal ( joinedOutput ( ) ,  '' ) 
156158} ) 
157159
@@ -274,7 +276,7 @@ t.test('access grant malformed team arg', async t => {
274276} ) 
275277
276278t . test ( 'access 2fa-required' ,  async  t  =>  { 
277-   const  {  npm,  joinedOutput }  =  await  loadMockNpm ( t ,  { 
279+   const  {  npm,  joinedOutput,  logs  }  =  await  loadMockNpm ( t ,  { 
278280    config : { 
279281      ...auth , 
280282    } , 
@@ -286,11 +288,12 @@ t.test('access 2fa-required', async t => {
286288  } ) 
287289  registry . access ( {  spec : '@scope/pkg' ,  publishRequires2fa : true  } ) 
288290  await  npm . exec ( 'access' ,  [ '2fa-required' ,  '@scope/pkg' ] ) 
291+   t . match ( logs . warn [ 0 ] ,  [ 'access' ,  '2fa-required subcommand will be removed in the next version of npm' ] ) 
289292  t . equal ( joinedOutput ( ) ,  '' ) 
290293} ) 
291294
292295t . test ( 'access 2fa-not-required' ,  async  t  =>  { 
293-   const  {  npm,  joinedOutput }  =  await  loadMockNpm ( t ,  { 
296+   const  {  npm,  joinedOutput,  logs  }  =  await  loadMockNpm ( t ,  { 
294297    config : { 
295298      ...auth , 
296299    } , 
@@ -302,6 +305,7 @@ t.test('access 2fa-not-required', async t => {
302305  } ) 
303306  registry . access ( {  spec : '@scope/pkg' ,  publishRequires2fa : false  } ) 
304307  await  npm . exec ( 'access' ,  [ '2fa-not-required' ,  '@scope/pkg' ] ) 
308+   t . match ( logs . warn [ 0 ] ,  [ 'access' ,  '2fa-not-required subcommand will be removed in the next version of npm' ] ) 
305309  t . equal ( joinedOutput ( ) ,  '' ) 
306310} ) 
307311
@@ -348,7 +352,7 @@ t.test('access revoke malformed team arg', async t => {
348352} ) 
349353
350354t . test ( 'npm access ls-packages with no team' ,  async  t  =>  { 
351-   const  {  npm,  joinedOutput }  =  await  loadMockNpm ( t ,  { 
355+   const  {  npm,  joinedOutput,  logs  }  =  await  loadMockNpm ( t ,  { 
352356    config : { 
353357      ...auth , 
354358    } , 
@@ -363,6 +367,7 @@ t.test('npm access ls-packages with no team', async t => {
363367  registry . whoami ( {  username : team  } ) 
364368  registry . lsPackages ( {  team,  packages } ) 
365369  await  npm . exec ( 'access' ,  [ 'ls-packages' ] ) 
370+   t . match ( logs . warn [ 0 ] ,  [ 'access' ,  'ls-packages subcommand will be removed in the next version of npm' ] ) 
366371  t . match ( JSON . parse ( joinedOutput ( ) ) ,  packages ) 
367372} ) 
368373
@@ -385,7 +390,7 @@ t.test('access ls-packages on team', async t => {
385390} ) 
386391
387392t . test ( 'access ls-collaborators on current' ,  async  t  =>  { 
388-   const  {  npm,  joinedOutput }  =  await  loadMockNpm ( t ,  { 
393+   const  {  npm,  joinedOutput,  logs  }  =  await  loadMockNpm ( t ,  { 
389394    config : { 
390395      ...auth , 
391396    } , 
@@ -403,6 +408,7 @@ t.test('access ls-collaborators on current', async t => {
403408  const  collaborators  =  {  'test-user' : 'read-write'  } 
404409  registry . lsCollaborators ( {  spec : 'yargs' ,  collaborators } ) 
405410  await  npm . exec ( 'access' ,  [ 'ls-collaborators' ] ) 
411+   t . match ( logs . warn [ 0 ] ,  [ 'access' ,  'ls-collaborators subcommand will be removed in the next version of npm' ] ) 
406412  t . match ( JSON . parse ( joinedOutput ( ) ) ,  collaborators ) 
407413} ) 
408414
0 commit comments