mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 17:30:25 -04:00
23 lines
606 B
TypeScript
23 lines
606 B
TypeScript
import { describe, expect, it, vi } from 'vitest'
|
|
|
|
import { getGitHubProfileImgUrl, openInstallGitHubIntegrationWindow } from './github'
|
|
|
|
// mock window.open
|
|
vi.stubGlobal('open', vi.fn())
|
|
|
|
describe('openInstallGitHubIntegrationWindow', () => {
|
|
it('should open the install window', () => {
|
|
openInstallGitHubIntegrationWindow('install')
|
|
|
|
expect(window.open).toHaveBeenCalled()
|
|
})
|
|
})
|
|
|
|
describe('getGitHubProfileImgUrl', () => {
|
|
it('should return the correct URL', () => {
|
|
const result = getGitHubProfileImgUrl('test')
|
|
|
|
expect(result).toBe('https://github.com/test.png?size=96')
|
|
})
|
|
})
|