@@ -540,7 +540,7 @@ t.test('enable-2fa', async t => {
540
540
541
541
t . test ( 'from basic username/password auth' , async t => {
542
542
const npmProfile = {
543
- async createToken ( pass ) {
543
+ async createToken ( ) {
544
544
return { }
545
545
} ,
546
546
}
@@ -587,7 +587,7 @@ t.test('enable-2fa', async t => {
587
587
async get ( ) {
588
588
return userProfile
589
589
} ,
590
- async set ( newProfile , conf ) {
590
+ async set ( newProfile ) {
591
591
t . match (
592
592
newProfile ,
593
593
{
@@ -659,7 +659,7 @@ t.test('enable-2fa', async t => {
659
659
} ,
660
660
}
661
661
} ,
662
- async set ( newProfile , conf ) {
662
+ async set ( newProfile ) {
663
663
setCount ++
664
664
665
665
// when profile response shows that 2fa is pending the
@@ -747,7 +747,7 @@ t.test('enable-2fa', async t => {
747
747
} ,
748
748
}
749
749
} ,
750
- async set ( newProfile , conf ) {
750
+ async set ( ) {
751
751
return {
752
752
...userProfile ,
753
753
tfa : 'http://foo?secret=1234' ,
@@ -759,7 +759,7 @@ t.test('enable-2fa', async t => {
759
759
async password ( ) {
760
760
return 'password1234'
761
761
} ,
762
- async otp ( label ) {
762
+ async otp ( ) {
763
763
return '123456'
764
764
} ,
765
765
}
@@ -786,7 +786,7 @@ t.test('enable-2fa', async t => {
786
786
async get ( ) {
787
787
return userProfile
788
788
} ,
789
- async set ( newProfile , conf ) {
789
+ async set ( ) {
790
790
return {
791
791
...userProfile ,
792
792
tfa : null ,
@@ -809,7 +809,7 @@ t.test('enable-2fa', async t => {
809
809
config : { otp : '123456' } ,
810
810
} )
811
811
812
- npm . config . getCredentialsByURI = reg => {
812
+ npm . config . getCredentialsByURI = ( ) => {
813
813
return { token : 'token' }
814
814
}
815
815
@@ -830,7 +830,7 @@ t.test('enable-2fa', async t => {
830
830
tfa : undefined ,
831
831
}
832
832
} ,
833
- async set ( newProfile , conf ) {
833
+ async set ( ) {
834
834
return {
835
835
...userProfile ,
836
836
tfa : null ,
@@ -852,7 +852,7 @@ t.test('enable-2fa', async t => {
852
852
readUserInfo,
853
853
} )
854
854
855
- npm . config . getCredentialsByURI = reg => {
855
+ npm . config . getCredentialsByURI = ( ) => {
856
856
return { token : 'token' }
857
857
}
858
858
@@ -873,7 +873,7 @@ t.test('enable-2fa', async t => {
873
873
tfa : undefined ,
874
874
}
875
875
} ,
876
- async set ( newProfile , conf ) {
876
+ async set ( ) {
877
877
return {
878
878
...userProfile ,
879
879
tfa : null ,
@@ -895,7 +895,7 @@ t.test('enable-2fa', async t => {
895
895
readUserInfo,
896
896
} )
897
897
898
- npm . config . getCredentialsByURI = reg => {
898
+ npm . config . getCredentialsByURI = ( ) => {
899
899
return { token : 'token' }
900
900
}
901
901
@@ -933,7 +933,7 @@ t.test('disable-2fa', async t => {
933
933
async get ( ) {
934
934
return userProfile
935
935
} ,
936
- async set ( newProfile , conf ) {
936
+ async set ( newProfile ) {
937
937
t . same (
938
938
newProfile ,
939
939
{
@@ -1014,7 +1014,7 @@ t.test('disable-2fa', async t => {
1014
1014
async get ( ) {
1015
1015
return userProfile
1016
1016
} ,
1017
- async set ( newProfile , conf ) {
1017
+ async set ( newProfile ) {
1018
1018
t . same (
1019
1019
newProfile ,
1020
1020
{
@@ -1032,7 +1032,7 @@ t.test('disable-2fa', async t => {
1032
1032
async password ( ) {
1033
1033
return 'password1234'
1034
1034
} ,
1035
- async otp ( label ) {
1035
+ async otp ( ) {
1036
1036
throw new Error ( 'should not ask for otp' )
1037
1037
} ,
1038
1038
}
0 commit comments