Advertisement
Guest User

Untitled

a guest
Apr 17th, 2021
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. const esModules = ['quasar/lang', 'lodash-es'].join('|');
  2.  
  3. module.exports = {
  4. globals: {
  5. __DEV__: true,
  6. // TODO: Remove if resolved natively https://github.com/vuejs/vue-jest/issues/175
  7. 'vue-jest': {
  8. pug: { doctype: 'html' },
  9. },
  10. },
  11. setupFilesAfterEnv: ['<rootDir>/test/jest/jest.setup.js'],
  12. // noStackTrace: true,
  13. // bail: true,
  14. // cache: false,
  15. // verbose: true,
  16. // watch: true,
  17. collectCoverage: false,
  18. coverageDirectory: '<rootDir>/test/jest/coverage',
  19. collectCoverageFrom: [
  20. '<rootDir>/src/**/*.vue',
  21. '<rootDir>/src/**/*.js',
  22. '<rootDir>/src/**/*.jsx',
  23. ],
  24. // Needed in JS codebases too because of feature flags
  25. coveragePathIgnorePatterns: ['/node_modules/', '.d.ts$'],
  26. coverageThreshold: {
  27. global: {
  28. // branches: 50,
  29. // functions: 50,
  30. // lines: 50,
  31. // statements: 50
  32. },
  33. },
  34. testMatch: [
  35. '<rootDir>/test/jest/__tests__/**/*.(spec|test).js',
  36. '<rootDir>/src/**/*.jest.(spec|test).js',
  37. ],
  38. moduleFileExtensions: ['vue', 'js', 'jsx', 'json'],
  39. moduleNameMapper: {
  40. '^vue$': 'vue/dist/vue.common.js',
  41. '^test-utils$': '@vue/test-utils/dist/vue-test-utils.js',
  42. "quasar": "<rootDir>/node_modules/quasar-framework",
  43. '^~/(.*)$': '<rootDir>/$1',
  44. '^src/(.*)$': '<rootDir>/src/$1',
  45. '^components/(.*)$': '<rootDir>/src/components/$1',
  46. '.*css$': '@quasar/quasar-app-extension-testing-unit-jest/stub.css',
  47. },
  48. transform: {
  49. '.*\\.vue$': 'vue-jest',
  50. '.*\\.js$': 'babel-jest',
  51. '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
  52. 'jest-transform-stub',
  53. // use these if NPM is being flaky, care as hosting could interfere with these
  54. // '.*\\.vue$': '@quasar/quasar-app-extension-testing-unit-jest/node_modules/vue-jest',
  55. // '.*\\.js$': '@quasar/quasar-app-extension-testing-unit-jest/node_modules/babel-jest'
  56. },
  57. transformIgnorePatterns: [`node_modules/(?!(${esModules}))`],
  58. snapshotSerializers: ['jest-serializer-vue'],
  59. };
  60.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement