mirror of
https://github.com/supabase/supabase.git
synced 2026-05-17 00:01:24 +08:00
* update gh action, update vitest config * debug * debug cov * idk try something different * test2 * test3 * add base path * rm debug * add apiAuthenticate tests * supabaseClient tests * apiWrappers tests * add apiHelpers tests * add configcat tests * add formatSql tests * add github tests * add cloudprovider utils tests * add helpers tests * fix typeerr * add missing readonly err * fix typeerrrs * fix type errors in apiWrapper tests * fix apiHelpers test * add packages/ui tests * add coveralls flags * try coveralls parallel config * fix coveralls parallel config --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
22 lines
605 B
TypeScript
22 lines
605 B
TypeScript
import { describe, it, expect, vi } from 'vitest'
|
|
import { openInstallGitHubIntegrationWindow, getGitHubProfileImgUrl } 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')
|
|
})
|
|
})
|