-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run tests in ci, remove tests from removed methods, jest config
- Loading branch information
1 parent
62cd19d
commit 51865fa
Showing
5 changed files
with
22 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ client.instance = { | |
joinBucket: jest.fn(), | ||
shareItemsToSelectGroup: jest.fn(), | ||
notificationSubscribe: jest.fn(), | ||
getPublicKey: jest.fn(), | ||
}; | ||
|
||
it('listDirectory makes the right requests', async () => { | ||
|
@@ -89,51 +90,6 @@ it('createFolder makes the right requests', async () => { | |
expect(client.instance.createFolder).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('createUsernameAndEmail makes the right requests', async () => { | ||
client.createUsernameAndEmail({ | ||
email: '[email protected]', | ||
username: 'fleek', | ||
}); | ||
|
||
expect(client.instance.createUsernameAndEmail).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('getIdentityByUsername makes the right requests', async () => { | ||
client.getIdentityByUsername({ | ||
username: 'fleek', | ||
}); | ||
|
||
expect(client.instance.getIdentityByUsername).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('shareBucketViaEmail makes the right requests', async () => { | ||
client.shareBucketViaEmail({ | ||
email: '[email protected]', | ||
bucket: 'my-bucket', | ||
}); | ||
|
||
expect(client.instance.shareBucketViaEmail).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('shareBucketViaIdentity makes the right requests', async () => { | ||
client.shareBucketViaIdentity({ | ||
identityType: 0, | ||
identityValue: 'fleek', | ||
bucket: 'my-bucket', | ||
}); | ||
|
||
expect(client.instance.shareBucketViaIdentity).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('generateFileShareLink makes the right requests', async () => { | ||
client.generateFileShareLink({ | ||
filepath: '/', | ||
bucket: 'my-bucket', | ||
}); | ||
|
||
expect(client.instance.generateFileShareLink).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('backupKeysByPassphrase makes the right requests', async () => { | ||
client.backupKeysByPassphrase({ | ||
passphrase: '123', | ||
|
@@ -196,25 +152,14 @@ it('joinBucket makes the right requests', async () => { | |
expect(client.instance.joinBucket).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('should call shareItemsToSelectGroup', async () => { | ||
const payload = { | ||
bucket: 'test', | ||
itemPaths: ['path/1/file.txt', 'path/2/key.txt'], | ||
invitations: [ | ||
{ | ||
invitationType: 'INVITE_THROUGH_ADDRESS', | ||
invitationValue: '[email protected]', | ||
}, | ||
], | ||
}; | ||
|
||
client.shareItemsToSelectGroup(payload); | ||
|
||
expect(client.instance.shareItemsToSelectGroup).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('notificationSubscribe makes the right requests', async () => { | ||
client.notificationSubscribe({}); | ||
|
||
expect(client.instance.notificationSubscribe).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('getPublicKey makes the right requests', async () => { | ||
client.getPublicKey({}); | ||
|
||
expect(client.instance.getPublicKey).toHaveBeenCalledTimes(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ | |
], | ||
"exclude": [ | ||
"dist", | ||
"**/*.spec.ts" | ||
"**/__tests__/*" | ||
] | ||
} |