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',
|
'^.+\\.(ts|tsx)$': 'ts-jest',
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^assets/(.*)$': '<rootDir>/src/assets/$1',
|
'^@/(.*)$': '<rootDir>/src/$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',
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": "src"
|
|
||||||
},
|
|
||||||
"include": ["src"]
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { renderNumberLabels, renderDateLabels } from 'lib/charts';
|
import { renderNumberLabels, renderDateLabels } from '../charts';
|
||||||
import { formatDate } from 'lib/date';
|
import { formatDate } from '../date';
|
||||||
|
|
||||||
// test for renderNumberLabels
|
// test for renderNumberLabels
|
||||||
|
|
||||||
|
|
@ -45,7 +45,8 @@ describe('renderDateLabels', () => {
|
||||||
const mockValues = [{ value: '2024-03-23T10:00:00Z' }, { value: '2024-03-24T15:30:00Z' }];
|
const mockValues = [{ value: '2024-03-23T10:00:00Z' }, { value: '2024-03-24T15:30:00Z' }];
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.spyOn(require('lib/date'), 'formatDate');
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
|
jest.spyOn(require('@/lib/date'), 'formatDate');
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
"incremental": false,
|
"incremental": false,
|
||||||
"types": ["jest"],
|
"types": ["jest"],
|
||||||
"typeRoots": ["node_modules/@types"],
|
"typeRoots": ["node_modules/@types"],
|
||||||
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue