jest.config.js 635 B

12345678910111213141516171819202122232425262728
  1. const func = require('@jupyterlab/testutils/lib/jest-config');
  2. const upstream = func('@jupyterlab/debugger', __dirname);
  3. let local = {
  4. preset: 'ts-jest/presets/js-with-babel',
  5. moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
  6. transformIgnorePatterns: ['/node_modules/(?!(@jupyterlab/.*)/)'],
  7. globals: {
  8. 'ts-jest': {
  9. tsConfig: './tsconfig.json'
  10. }
  11. },
  12. transform: {
  13. '\\.(ts|tsx)?$': 'ts-jest'
  14. }
  15. };
  16. [
  17. 'moduleNameMapper',
  18. 'reporters',
  19. 'setupFilesAfterEnv',
  20. 'setupFiles',
  21. 'moduleFileExtensions'
  22. ].forEach(option => {
  23. local[option] = upstream[option];
  24. });
  25. module.exports = local;