39 lines
1.8 KiB
JavaScript
39 lines
1.8 KiB
JavaScript
module.exports = {
|
|
verbose: true,
|
|
coverageReporters: ["html", "text", "jest-junit", "cobertura"],
|
|
testResultsProcessor: "jest-junit",
|
|
preset: "@vue/cli-plugin-unit-jest",
|
|
transform: { "^.+\\.vue$": "vue-jest" },
|
|
moduleFileExtensions: ["js", "vue"],
|
|
collectCoverageFrom: [
|
|
"src/**/*.{js,vue}",
|
|
"!src/main.js",
|
|
"!src/constants/*.js",
|
|
"!src/router/**/*.js",
|
|
"!src/helpers/unit-test-helper.js",
|
|
"!src/layouts/component-test/component-test.vue",
|
|
"!src/layouts/form-test/form-test.vue",
|
|
"!src/layouts/vin-lookup/vin-lookup.vue",
|
|
"!src/layouts/vehicle-damage/windshield-damage-type-question/windshield-damage-type-question.vue",
|
|
"!src/layouts/vehicle-damage/windshield-options/windshield-options.vue",
|
|
"!src/layouts/part-questions/**/*.vue",
|
|
"!src/layouts/reveal/**/*.vue",
|
|
"!src/layouts/estimate/**/*.vue",
|
|
// TODO REMOVE THESE AFTER WRITING UNIT TESTS
|
|
"!src/layouts/address-lookup/address-lookup.vue",
|
|
"!src/layouts/address-lookup/customer-questions/customer-questions.vue",
|
|
"!src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue",
|
|
"!src/layouts/address-vehicles/address-vehicles.vue",
|
|
"!src/common-components/dropdown-question/dropdown-question.vue",
|
|
"!src/common-components/textbox-question/textbox-question.vue",
|
|
"!src/helpers/validation-rules.js",
|
|
// END
|
|
], // ! means exclude from coverage.
|
|
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],
|
|
coverageThreshold: {
|
|
global: {
|
|
statements: 85,
|
|
// Got the go ahead from Mark to temporarily lower this. Taking out initialize component made the year,make,model and style coverage drop a bit. Once unit tests for license plate lookup, vin lookup and address lookup are in the coverage should go back up to 90
|
|
},
|
|
},
|
|
};
|