mirror of https://github.com/buster-so/buster.git
Fix linting errors
This commit is contained in:
parent
f582065772
commit
8947758f6f
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { db } from '@buster/database';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { findOrCreateSlackChat } from './events';
|
||||
|
||||
vi.mock('@buster/database', () => ({
|
||||
|
@ -31,13 +31,6 @@ describe('findOrCreateSlackChat', () => {
|
|||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([]),
|
||||
} as any;
|
||||
} else {
|
||||
// Mock for slack integration query
|
||||
return {
|
||||
from: vi.fn().mockReturnThis(),
|
||||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([{ defaultSharingPermissions: 'shareWithWorkspace' }]),
|
||||
} as any;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -87,13 +80,6 @@ describe('findOrCreateSlackChat', () => {
|
|||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([]),
|
||||
} as any;
|
||||
} else {
|
||||
// Mock for slack integration query
|
||||
return {
|
||||
from: vi.fn().mockReturnThis(),
|
||||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([{ defaultSharingPermissions: 'shareWithChannel' }]),
|
||||
} as any;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -143,13 +129,6 @@ describe('findOrCreateSlackChat', () => {
|
|||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([{ id: 'existing-chat-id' }]),
|
||||
} as any;
|
||||
} else {
|
||||
// Mock for slack integration query (won't be used due to early return)
|
||||
return {
|
||||
from: vi.fn().mockReturnThis(),
|
||||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([]),
|
||||
} as any;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -181,13 +160,6 @@ describe('findOrCreateSlackChat', () => {
|
|||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([]),
|
||||
} as any;
|
||||
} else {
|
||||
// Mock for slack integration query - no integration found
|
||||
return {
|
||||
from: vi.fn().mockReturnThis(),
|
||||
where: vi.fn().mockReturnThis(),
|
||||
limit: vi.fn().mockResolvedValue([]),
|
||||
} as any;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue