Skip to content

Commit c7c8ff1

Browse files
committed
test(login): move the imports above the vi.mock block
1 parent f2e260f commit c7c8ff1

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

apps/pythinker-code/test/cli/login.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ import { Command } from 'commander';
1212
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
1313
import type { DeviceAuthorization } from '@pythoughts/pythinker-code-oauth';
1414

15+
import { password, select, text } from '@clack/prompts';
16+
import {
17+
createPythinkerHarness,
18+
fetchCatalog,
19+
type Catalog,
20+
} from '@pythoughts/pythinker-code-sdk';
21+
22+
import { registerLoginCommand } from '#/cli/sub/login';
23+
import { openUrl } from '#/utils/open-url';
24+
1525
const mockLogin = vi.fn();
1626
const mockStatus = vi.fn();
1727
const mockGetConfig = vi.fn();
@@ -86,16 +96,6 @@ vi.mock('@pythoughts/pythinker-code-oauth', async () => {
8696

8797
vi.mock('#/utils/open-url', () => ({ openUrl: vi.fn() }));
8898

89-
import { password, select, text } from '@clack/prompts';
90-
import {
91-
createPythinkerHarness,
92-
fetchCatalog,
93-
type Catalog,
94-
} from '@pythoughts/pythinker-code-sdk';
95-
96-
import { registerLoginCommand } from '#/cli/sub/login';
97-
import { openUrl } from '#/utils/open-url';
98-
9999
class ExitCalled extends Error {
100100
constructor(public code: number | string | null | undefined) {
101101
super(`process.exit(${String(code)})`);

0 commit comments

Comments
 (0)