refactor: use test
This commit is contained in:
@@ -57,7 +57,7 @@ describe('RelayService', () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
it('addRelay', async () => {
|
||||
test('addRelay', async () => {
|
||||
const result = await relayService.addRelay('https://example.com');
|
||||
|
||||
expect(result.inbox).toBe('https://example.com');
|
||||
@@ -68,7 +68,7 @@ describe('RelayService', () => {
|
||||
//expect(queueService.deliver.mock.lastCall![0].username).toBe('relay.actor');
|
||||
});
|
||||
|
||||
it('listRelay', async () => {
|
||||
test('listRelay', async () => {
|
||||
const result = await relayService.listRelay();
|
||||
|
||||
expect(result.length).toBe(1);
|
||||
@@ -76,7 +76,7 @@ describe('RelayService', () => {
|
||||
expect(result[0].status).toBe('requesting');
|
||||
});
|
||||
|
||||
it('removeRelay: succ', async () => {
|
||||
test('removeRelay: succ', async () => {
|
||||
await relayService.removeRelay('https://example.com');
|
||||
|
||||
expect(queueService.deliver).toHaveBeenCalled();
|
||||
@@ -89,7 +89,7 @@ describe('RelayService', () => {
|
||||
expect(list.length).toBe(0);
|
||||
});
|
||||
|
||||
it('removeRelay: fail', async () => {
|
||||
test('removeRelay: fail', async () => {
|
||||
await expect(relayService.removeRelay('https://x.example.com'))
|
||||
.rejects.toThrow('relay not found');
|
||||
});
|
||||
|
Reference in New Issue
Block a user