Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
fix: comma-dangle
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenukvern committed Mar 19, 2021
1 parent 6f62b5d commit 42f9c5d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/datastore/tests/Vue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ describe("vue hooks test suite", () => {
const originState: ReactiveState<Record<string, unknown>> = {
data: [],
error: null,
loading: false,
loading: false
};
const stateCopy = (title?: Maybe<string>) => {
const copy = JSON.parse(JSON.stringify(originState)) as ReactiveState<
Record<string, unknown>
>;
if (title) copy.data.push({ title });
if (title) {copy.data.push({ title });}
return copy;
};

test("it should update result for add", () => {
const state = ref(stateCopy());
const event = {
eventType: CRUDEvents.ADD,
data: [{ title: "Test" }],
data: [{ title: "Test" }]
};
const result = useDatastoreHooks.updateResult(state, event, "title");

Expand All @@ -32,7 +32,7 @@ describe("vue hooks test suite", () => {
const state = ref(stateCopy("Test"));
const event = {
eventType: CRUDEvents.UPDATE,
data: [{ title: "Test", pass: true }],
data: [{ title: "Test", pass: true }]
};
const result = useDatastoreHooks.updateResult(state, event, "title");

Expand All @@ -46,9 +46,9 @@ describe("vue hooks test suite", () => {
data: [
{
previous: { title: "Test", pass: true },
current: { title: "NewTest", pass: true },
},
],
current: { title: "NewTest", pass: true }
}
]
};
const result = useDatastoreHooks.updateResult(state, event, "title");

Expand All @@ -60,7 +60,7 @@ describe("vue hooks test suite", () => {
const state = ref(stateCopy());
const event = {
eventType: CRUDEvents.DELETE,
data: [{ title: "Test" }],
data: [{ title: "Test" }]
};
const result = useDatastoreHooks.updateResult(state, event, "title");

Expand Down

0 comments on commit 42f9c5d

Please sign in to comment.