mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Fix test.
This commit is contained in:
parent
0ad58ec07c
commit
97b7a14a29
4 changed files with 6 additions and 16 deletions
|
|
@ -5,12 +5,6 @@ export default {
|
|||
'^.+\\.(ts|tsx)$': 'ts-jest',
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^assets/(.*)$': '<rootDir>/src/assets/$1',
|
||||
'^components/(.*)$': '<rootDir>/src/components/$1',
|
||||
'^lib/(.*)$': '<rootDir>/src/lib/$1',
|
||||
'^pages/(.*)$': '<rootDir>/src/pages/$1',
|
||||
'^queries/(.*)$': '<rootDir>/src/queries/$1',
|
||||
'^store/(.*)$': '<rootDir>/src/store/$1',
|
||||
'^styles/(.*)$': '<rootDir>/src/styles/$1',
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { renderNumberLabels, renderDateLabels } from 'lib/charts';
|
||||
import { formatDate } from 'lib/date';
|
||||
import { renderNumberLabels, renderDateLabels } from '../charts';
|
||||
import { formatDate } from '../date';
|
||||
|
||||
// test for renderNumberLabels
|
||||
|
||||
|
|
@ -45,7 +45,8 @@ describe('renderDateLabels', () => {
|
|||
const mockValues = [{ value: '2024-03-23T10:00:00Z' }, { value: '2024-03-24T15:30:00Z' }];
|
||||
|
||||
beforeEach(() => {
|
||||
jest.spyOn(require('lib/date'), 'formatDate');
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
jest.spyOn(require('@/lib/date'), 'formatDate');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
"incremental": false,
|
||||
"types": ["jest"],
|
||||
"typeRoots": ["node_modules/@types"],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue