66 waitFor ,
77} from '@testing-library/react' ;
88import { MemoryRouter } from 'react-router-dom' ;
9+
10+ import { BaseStyles , ThemeProvider } from '@primer/react' ;
11+
912import {
1013 mockAuth ,
1114 mockGitHubAppAccount ,
@@ -17,7 +20,6 @@ import { AppContext } from '../context/App';
1720import * as apiRequests from '../utils/api/request' ;
1821import * as comms from '../utils/comms' ;
1922import * as links from '../utils/links' ;
20-
2123import { AccountsRoute } from './Accounts' ;
2224
2325const mockNavigate = jest . fn ( ) ;
@@ -243,17 +245,21 @@ describe('renderer/routes/Accounts.tsx', () => {
243245
244246 await act ( async ( ) => {
245247 render (
246- < AppContext . Provider
247- value = { {
248- auth : { accounts : [ mockOAuthAccount ] } ,
249- settings : mockSettings ,
250- loginWithGitHubApp : mockLoginWithGitHubApp ,
251- } }
252- >
253- < MemoryRouter >
254- < AccountsRoute />
255- </ MemoryRouter >
256- </ AppContext . Provider > ,
248+ < ThemeProvider >
249+ < BaseStyles >
250+ < AppContext . Provider
251+ value = { {
252+ auth : { accounts : [ mockOAuthAccount ] } ,
253+ settings : mockSettings ,
254+ loginWithGitHubApp : mockLoginWithGitHubApp ,
255+ } }
256+ >
257+ < MemoryRouter >
258+ < AccountsRoute />
259+ </ MemoryRouter >
260+ </ AppContext . Provider >
261+ </ BaseStyles >
262+ </ ThemeProvider > ,
257263 ) ;
258264 } ) ;
259265
@@ -266,16 +272,20 @@ describe('renderer/routes/Accounts.tsx', () => {
266272 it ( 'should show login with personal access token' , async ( ) => {
267273 await act ( async ( ) => {
268274 render (
269- < AppContext . Provider
270- value = { {
271- auth : { accounts : [ mockOAuthAccount ] } ,
272- settings : mockSettings ,
273- } }
274- >
275- < MemoryRouter >
276- < AccountsRoute />
277- </ MemoryRouter >
278- </ AppContext . Provider > ,
275+ < ThemeProvider >
276+ < BaseStyles >
277+ < AppContext . Provider
278+ value = { {
279+ auth : { accounts : [ mockOAuthAccount ] } ,
280+ settings : mockSettings ,
281+ } }
282+ >
283+ < MemoryRouter >
284+ < AccountsRoute />
285+ </ MemoryRouter >
286+ </ AppContext . Provider >
287+ </ BaseStyles >
288+ </ ThemeProvider > ,
279289 ) ;
280290 } ) ;
281291
@@ -294,16 +304,20 @@ describe('renderer/routes/Accounts.tsx', () => {
294304 it ( 'should show login with oauth app' , async ( ) => {
295305 await act ( async ( ) => {
296306 render (
297- < AppContext . Provider
298- value = { {
299- auth : { accounts : [ mockPersonalAccessTokenAccount ] } ,
300- settings : mockSettings ,
301- } }
302- >
303- < MemoryRouter >
304- < AccountsRoute />
305- </ MemoryRouter >
306- </ AppContext . Provider > ,
307+ < ThemeProvider >
308+ < BaseStyles >
309+ < AppContext . Provider
310+ value = { {
311+ auth : { accounts : [ mockPersonalAccessTokenAccount ] } ,
312+ settings : mockSettings ,
313+ } }
314+ >
315+ < MemoryRouter >
316+ < AccountsRoute />
317+ </ MemoryRouter >
318+ </ AppContext . Provider >
319+ </ BaseStyles >
320+ </ ThemeProvider > ,
307321 ) ;
308322 } ) ;
309323
0 commit comments