# What this PR does There are the following tests added: - admin is allowed to edit other profiles - editor is not allowed to edit other profiles ## Which issue(s) this PR fixes https://github.com/grafana/oncall/issues/1586 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
25 lines
816 B
JavaScript
25 lines
816 B
JavaScript
const esModules = ['@grafana', 'uplot', 'ol', 'd3', 'react-colorful', 'uuid'].join('|');
|
|
|
|
module.exports = {
|
|
testEnvironment: 'jsdom',
|
|
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
moduleFileExtensions: ['ts', 'tsx', 'js'],
|
|
|
|
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
|
|
|
|
moduleNameMapper: {
|
|
'grafana/app/(.*)': '<rootDir>/src/jest/grafanaMock.ts',
|
|
'jest/matchMedia': '<rootDir>/src/jest/matchMedia.ts',
|
|
'^jest$': '<rootDir>/src/jest',
|
|
'^.+\\.(css|scss)$': '<rootDir>/src/jest/styleMock.ts',
|
|
'^lodash-es$': 'lodash',
|
|
'^.+\\.svg$': '<rootDir>/src/jest/svgTransform.ts',
|
|
'^.+\\.png$': '<rootDir>/src/jest/grafanaMock.ts',
|
|
},
|
|
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
|
|
|
testTimeout: 10000,
|
|
testPathIgnorePatterns: ['/node_modules/', '/e2e-tests/'],
|
|
};
|