| 12345678910111213141516171819202122 |
- 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')
- })
- })
|