Skip to content

Commit

Permalink
moved some unit test files
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalabbad committed Jan 13, 2025
1 parent 57fe008 commit 2a6de13
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import {
mutationStringForMetaEdit,
newDataForMetaEdit,
updatedObjectForMetaEdit,
} from "../../mocks/data/devices";
} from "../../../../tests/mocks/data/devices";

const updatedObject = getMutationMetaDetailsFromFormData(
deviceDetailsMocksSchema[0],
newDataForMetaEdit,
deviceDetailsMocksData.InfraDevice.edges[0].node,
deviceDetailsMocksData.InfraDevice.edges[0]!.node,
"relationship",
"site",
deviceDetailsMocksData.InfraDevice.edges[0].node.site.properties
deviceDetailsMocksData.InfraDevice.edges[0]!.node.site.properties
);

describe("Mutation details from object data", () => {
Expand All @@ -26,7 +26,7 @@ describe("Mutation details from object data", () => {

it("should return a correct mutation from the updated object", () => {
const mutationString = updateObjectWithId({
kind: deviceDetailsMocksSchema[0].kind,
kind: deviceDetailsMocksSchema[0]!.kind,
data: stringifyWithoutQuotes(updatedObject),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
FormRelationshipValue,
RelationshipValueFromPool,
} from "@/shared/components/form/type";
import { buildField } from "@/shared/components/form/utils/mutations/getCreateMutationFromFormData.test";
import { getUpdateMutationFromFormData } from "@/shared/components/form/utils/mutations/getUpdateMutationFromFormData";
import { describe, expect } from "vitest";
import { buildField } from "./getCreateMutationFromFormData.test";

describe("getUpdateMutationFromFormData - test", () => {
it("returns empty if there is no fields in form", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IModelSchema } from "@/entities/schema/stores/schema.atom";
import { getObjectFromFilters } from "@/shared/components/filters/utils/getObjectFromFilters";
import { buildRelationshipSchema } from "@/shared/components/form/utils/getFormFieldsFromSchema.test";
import { Filter } from "@/shared/hooks/useFilters";
import { describe, expect } from "vitest";
import { buildRelationshipSchema } from "../form/utils/getFormFieldsFromSchema.test";

describe("getObjectFromFilters - test", () => {
it("returns value for a attribute correctly", () => {
Expand Down

0 comments on commit 2a6de13

Please sign in to comment.