lint
This commit is contained in:
parent
7e51f4be92
commit
5da7037e4d
4 changed files with 10 additions and 4 deletions
6
src/.eslintrc.js
Normal file
6
src/.eslintrc.js
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
jest: true
|
||||||
|
},
|
||||||
|
//...
|
||||||
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ function setupMocks({
|
||||||
categoryValue = "CAR"
|
categoryValue = "CAR"
|
||||||
}) {
|
}) {
|
||||||
//Mock store
|
//Mock store
|
||||||
store.dispatch = jest.fn(() => dataFromStoreApi);
|
store.dispatch = jest.fn(() => {});
|
||||||
store.getters = { vehicle: { category: categoryValue, imageUrl: imageUrlValue } };
|
store.getters = { vehicle: { category: categoryValue, imageUrl: imageUrlValue } };
|
||||||
const mountOptions = getMountOptions({
|
const mountOptions = getMountOptions({
|
||||||
store: {
|
store: {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-que
|
||||||
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
||||||
import { nextTick } from "vue";
|
import { nextTick } from "vue";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
jest.mock("@/store", () => { return {}; }, {virtual: true});
|
jest.mock("@/store",()=>{return{};},{virtual:true});
|
||||||
|
|
||||||
describe("replace-options-question.vue", () => {
|
describe("replace-options-question.vue", () => {
|
||||||
test("Selected damage option is emitted upon selection.", async () => {
|
test("Selected damage option is emitted upon selection.", async () => {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import sideDoorOptions from "@/layouts/vehicle-damage/side-door-options/side-doo
|
||||||
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
||||||
import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-question/replace-options-question";
|
import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-question/replace-options-question";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
jest.mock("@/store", () => { return {}; }, {virtual: true});
|
jest.mock("@/store",()=>{return{};},{virtual:true});
|
||||||
|
|
||||||
describe("replace-options-question.vue", () => {
|
describe("replace-options-question.vue", () => {
|
||||||
test("Selected side door option is emitted upon selection.", async () => {
|
test("Selected side door option is emitted upon selection.", async () => {
|
||||||
|
|
@ -95,7 +95,7 @@ describe("replace-options-question.vue", () => {
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
//Mock store
|
//Mock store
|
||||||
store.dispatch = jest.fn(() => dataFromStoreApi);
|
store.dispatch = jest.fn(() => {});
|
||||||
store.getters = { vehicle: {year: 2019, make: 'honda', model: 'civc', style: '2 Door', category: 'CAR'} };
|
store.getters = { vehicle: {year: 2019, make: 'honda', model: 'civc', style: '2 Door', category: 'CAR'} };
|
||||||
const mountOptions = getMountOptions({
|
const mountOptions = getMountOptions({
|
||||||
store: {
|
store: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue