File tree 5 files changed +6
-4
lines changed
5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 40
40
"build" : " cross-env NODE_ENV=production run-s dist type:check 'vite:build {@}' --" ,
41
41
"build:web" : " VITE_WEB=true VITE_BASE=/trakt-extension/ pnpm run build" ,
42
42
"analyse" : " vite-bundle-visualizer" ,
43
- "test:unit" : " vitest run --environment jsdom -- coverage" ,
44
- "test:watch" : " vitest --environment jsdom " ,
43
+ "test:unit" : " vitest run --coverage" ,
44
+ "test:watch" : " vitest" ,
45
45
"typecheck" : " vue-tsc --noEmit -p tsconfig.vitest.json --composite false" ,
46
46
"lint" : " eslint ." ,
47
47
"lint:fix" : " pnpm run lint --fix" ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const Staging = {
22
22
23
23
const isProd = import . meta. env . PROD ;
24
24
25
- const client = ! isProd ? Production : Staging ;
25
+ const client = isProd ? Production : Staging ;
26
26
27
27
const browserRedirect = window . location . href . split ( '#' ) . at ( 0 ) ?? client . RedirectionUrl ;
28
28
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const openTab = (options: chrome.tabs.CreateProperties) => window.open(options.u
10
10
/**
11
11
* @see [chrome.tabs.create](https://developer.chrome.com/docs/extensions/reference/tabs/#method-create)
12
12
*/
13
- export const createTab = chrome ?. tabs ?. create ?? openTab ;
13
+ export const createTab = ( options : chrome . tabs . CreateProperties ) => ( chrome ?. tabs ?. create ?? openTab ) ( options ) ;
14
14
15
15
/**
16
16
* The ID of the current extension.
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ export default defineConfig(() => ({
167
167
coverage : {
168
168
reportsDirectory : '../coverage' ,
169
169
} ,
170
+ setupFiles : [ '../vitest.setup.ts' ] ,
170
171
} ,
171
172
optimizeDeps : {
172
173
exclude : [ 'path' , 'fast-glob' ] ,
Original file line number Diff line number Diff line change
1
+ global . chrome = { } as typeof chrome ;
You can’t perform that action at this time.
0 commit comments