Skip to content

Commit 47ed424

Browse files
committed
regular update
1 parent 88cab7e commit 47ed424

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Lighthouse/tests/encryption.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const signAuthMessage = async (privateKey: string) => {
1313
describe('encryption', () => {
1414
describe('getAuthMessage', () => {
1515
it('should get auth message when valid public key is provided', async () => {
16-
console.log('testing getAuthMessage')
1716
const response = await lighthouse.getAuthMessage(
1817
'0x1Ec09D4B3Cb565b7CCe2eEAf71CC90c9b46c5c26'
1918
)
@@ -24,7 +23,6 @@ describe('encryption', () => {
2423

2524
it('should not get auth message when invalid public key is provided', async () => {
2625
try {
27-
console.log('testing getAuthMessage with invalid public key')
2826
const response = await lighthouse.getAuthMessage('invalidPublicKey')
2927
} catch (error) {
3028
expect(error.message).toBe('Invalid public Key')
@@ -38,7 +36,6 @@ describe('encryption', () => {
3836
const cid = 'QmVkHgHnYVUfvTXsaJisHRgc89zsrgVL6ATh9mSiegRYrX'
3937

4038
it('should fetch encryption key when correct public-private key pair is provided', async () => {
41-
console.log('testing fetchEncryptionKey')
4239
const signed_message = await signAuthMessage(privateKey)
4340
const response = await lighthouse.fetchEncryptionKey(
4441
cid,
@@ -50,7 +47,6 @@ describe('encryption', () => {
5047

5148
it('should not fetch encryption key when incorrect public-private key pair is provided', async () => {
5249
try {
53-
console.log('testing fetchEncryptionKey with incorrect key pair')
5450
const randomPublicKey = '0x1ccEF158Dcbe6643F1cC577F236af79993F4D066'
5551
const signed_message = await signAuthMessage(privateKey)
5652
const response = await lighthouse.fetchEncryptionKey(
@@ -122,7 +118,7 @@ describe('encryption', () => {
122118
signed_message
123119
)
124120
} catch (error) {
125-
expect(error.message.message.message).toEqual('access denied')
121+
expect(error.message[0].message.message).toEqual('access denied')
126122
}
127123
}, 10000)
128124
})

src/Lighthouse/tests/upload.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('uploadFiles', () => {
5353
)
5454
await lighthouse.upload(path, 'random apiKey')
5555
} catch (error) {
56-
expect(error.message).toBe('Error: Authentication failed')
56+
expect(error.message).toBe('Error: Request failed with status code 401')
5757
}
5858
}, 60000)
5959
})

0 commit comments

Comments
 (0)