Commit d633cc3c by Hugo Häggmark Committed by GitHub

Tests: removes unused stuff and replaces monaco transpile with mock (#27324)

parent febbc60e
const esModule = '@iconscout/react-unicons|monaco-editor/esm/vs';
module.exports = {
verbose: false,
transform: {
'^.+\\.(ts|tsx|js|jsx)$': 'ts-jest',
[`(${esModule}).+\\.js$`]: 'babel-jest',
},
transformIgnorePatterns: [`/node_modules/(?!${esModule})`],
moduleDirectories: ['node_modules', 'public'],
roots: ['<rootDir>/public/app', '<rootDir>/public/test', '<rootDir>/packages', '<rootDir>/scripts'],
testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$',
......@@ -18,5 +14,7 @@ module.exports = {
moduleNameMapper: {
'\\.svg': '<rootDir>/public/test/mocks/svg.ts',
'\\.css': '<rootDir>/public/test/mocks/style.ts',
'monaco-editor/esm/vs/editor/editor.api': '<rootDir>/public/test/mocks/monaco.ts',
},
watchPathIgnorePatterns: ['<rootDir>/node_modules/'],
};
......@@ -119,7 +119,6 @@
"@types/tinycolor2": "1.4.2",
"@typescript-eslint/eslint-plugin": "3.6.0",
"@typescript-eslint/parser": "3.6.0",
"angular-mocks": "1.6.6",
"autoprefixer": "9.7.4",
"axios": "0.19.2",
"babel-core": "7.0.0-bridge.0",
......
import 'jquery';
import angular from 'angular';
import 'angular-mocks';
import 'app/app';
// configure enzyme
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
angular.module('grafana', ['ngRoute']);
angular.module('grafana.services', ['ngRoute', '$strap.directives']);
angular.module('grafana.panels', []);
angular.module('grafana.controllers', []);
angular.module('grafana.directives', []);
angular.module('grafana.filters', []);
angular.module('grafana.routes', ['ngRoute']);
const context = (require as any).context('../', true, /specs\.(tsx?|js)/);
for (const key of context.keys()) {
context(key);
}
export const monaco = 'monaco';
......@@ -7419,11 +7419,6 @@ angular-bindonce@0.3.1:
resolved "https://registry.yarnpkg.com/angular-bindonce/-/angular-bindonce-0.3.1.tgz#af19574abd43f608b9236a302cc5ce49d71dc9c6"
integrity sha1-rxlXSr1D9gi5I2owLMXOSdcdycY=
angular-mocks@1.6.6:
version "1.6.6"
resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.6.6.tgz#c93018e7838c6dc5ceaf1a6bcf9be13c830ea515"
integrity sha1-yTAY54OMbcXOrxprz5vhPIMOpRU=
angular-native-dragdrop@1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/angular-native-dragdrop/-/angular-native-dragdrop-1.2.2.tgz#d646c6b75b131c48073c3f6e36a225b2726d8bae"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment