From 1cc0c4c21acd98d20322d0a569454903c030a64c Mon Sep 17 00:00:00 2001 From: Kasnix Date: Tue, 6 Aug 2024 11:49:04 -0300 Subject: [PATCH] chore: improve file and directory structure --- README.md | 2 +- docs/{object-graph.md => object-graph.doc.md} | 0 .../index.mock.ts => mocks/object-graph.mock.ts | 0 src/{object-graph/index.ts => object-graph.ts} | 0 .../index.test.ts => tests/object-graph.test.ts | 10 ++++++++-- tsconfig.json | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) rename docs/{object-graph.md => object-graph.doc.md} (100%) rename src/object-graph/index.mock.ts => mocks/object-graph.mock.ts (100%) rename src/{object-graph/index.ts => object-graph.ts} (100%) rename src/object-graph/index.test.ts => tests/object-graph.test.ts (97%) diff --git a/README.md b/README.md index 3fea50a..42821d5 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Structured Objects is lightweight and powerful library for handling object in Ja ## Resources -- [Object Graph](./docs/object-graph.md) +- [Object Graph](./docs/object-graph.doc.md) diff --git a/docs/object-graph.md b/docs/object-graph.doc.md similarity index 100% rename from docs/object-graph.md rename to docs/object-graph.doc.md diff --git a/src/object-graph/index.mock.ts b/mocks/object-graph.mock.ts similarity index 100% rename from src/object-graph/index.mock.ts rename to mocks/object-graph.mock.ts diff --git a/src/object-graph/index.ts b/src/object-graph.ts similarity index 100% rename from src/object-graph/index.ts rename to src/object-graph.ts diff --git a/src/object-graph/index.test.ts b/tests/object-graph.test.ts similarity index 97% rename from src/object-graph/index.test.ts rename to tests/object-graph.test.ts index 2dacafc..622d564 100644 --- a/src/object-graph/index.test.ts +++ b/tests/object-graph.test.ts @@ -1,7 +1,13 @@ import { expect, describe, test, vi } from "vitest"; -import { ObjectGraph } from "."; -import { shirtsMock, extraShirtsMock, type Shirt, type Color, type Size } from "./index.mock"; +import { ObjectGraph } from "../src/object-graph"; +import { + shirtsMock, + extraShirtsMock, + type Shirt, + type Color, + type Size, +} from "../mocks/object-graph.mock"; describe("length", () => { test("get the length of the object graph", () => { diff --git a/tsconfig.json b/tsconfig.json index 75abdef..ec6be67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,5 +19,5 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src"] + "include": ["src", "mocks", "tests"] }