Build: Setup webpack configuration for direct-input bundled datasource (#67199)

This commit is contained in:
Esteban Beltran
2023-04-26 12:45:34 +03:00
committed by GitHub
parent f0bdaed5b4
commit c54d2133a7
7 changed files with 198 additions and 43 deletions
@@ -1,8 +1,18 @@
// This file is needed because it is used by vscode and other tools that
// call `jest` directly. However, unless you are doing anything special
// do not edit this file
const standard = require('@grafana/toolkit/src/config/jest.plugin.config');
// This process will use the same config that `yarn test` is using
module.exports = standard.jestConfig();
module.exports = {
testEnvironment: 'jest-environment-jsdom',
preset: 'ts-jest',
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.(t|j)sx?$': [
'ts-jest',
{
useESM: true,
isolatedModules: true,
allowJs: true,
},
],
},
moduleNameMapper: {
'^d3-interpolate$': '<rootDir>/__mocks__/d3-interpolate.ts',
},
};