view client/jest.config.js @ 2502:e13daf439068 critical-bottlenecks

client: fixed Unexpected side effect in computed property Sort mutates the array and since this array lives in the store, this would be considered a bad practice including said side effects. Slice clones the array and we need to slice the array anyway. So simply switching slice and sort solved the problem.
author Markus Kottlaender <markus@intevation.de>
date Mon, 04 Mar 2019 16:20:57 +0100
parents 88d0d60924cf
children
line wrap: on
line source

module.exports = {
  moduleFileExtensions: ["js", "jsx", "json", "vue"],
  transform: {
    "^.+\\.vue$": "vue-jest",
    ".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
      "jest-transform-stub",
    "^.+\\.jsx?$": "babel-jest"
  },
  moduleNameMapper: {
    "^@/(.*)$": "<rootDir>/src/$1"
  },
  snapshotSerializers: ["jest-serializer-vue"],
  testMatch: [
    "<rootDir>/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))"
  ]
};