fix test files
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import React from 'react';
|
||||
import { Browser } from 'webextension-polyfill';
|
||||
import { renderWithProviders } from '../utils/test-utils';
|
||||
import MainList from './MainList';
|
||||
|
||||
jest.mock<typeof import('webextension-polyfill')>('webextension-polyfill', () => {
|
||||
return {
|
||||
runtime: {
|
||||
getManifest: () => {
|
||||
return { version: 'test-version' };
|
||||
},
|
||||
getManifest: () => ({
|
||||
version: 'test-version',
|
||||
}),
|
||||
},
|
||||
};
|
||||
} as Browser;
|
||||
});
|
||||
|
||||
describe('MainList', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Browser } from 'webextension-polyfill';
|
||||
import { renderWithProviders } from '../utils/test-utils';
|
||||
import NavBar from './NavBar';
|
||||
|
||||
@@ -9,7 +10,7 @@ jest.mock<typeof import('webextension-polyfill')>('webextension-polyfill', () =>
|
||||
return { version: 'test-version' };
|
||||
},
|
||||
},
|
||||
};
|
||||
} as Browser;
|
||||
});
|
||||
|
||||
describe('NavBar', () => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Browser } from 'webextension-polyfill';
|
||||
import config from './config';
|
||||
|
||||
jest.mock<typeof import('webextension-polyfill')>('webextension-polyfill', () => {
|
||||
@@ -7,7 +8,7 @@ jest.mock<typeof import('webextension-polyfill')>('webextension-polyfill', () =>
|
||||
return { version: 'test-version' };
|
||||
},
|
||||
},
|
||||
};
|
||||
} as Browser;
|
||||
});
|
||||
|
||||
describe('wakatime config', () => {
|
||||
@@ -68,6 +69,7 @@ describe('wakatime config', () => {
|
||||
"tiktok.com",
|
||||
"twitter.com",
|
||||
"whatsapp.com",
|
||||
"x.com",
|
||||
"youtube.com",
|
||||
],
|
||||
"states": [
|
||||
|
||||
Reference in New Issue
Block a user