Skip to content

Commit

Permalink
Uml to json for future ai integration (#118)
Browse files Browse the repository at this point in the history
* initial commit for basic uml to json formatter and space to integrate sending to ai

* Added jest testing for useUMLFormatter hook and fixed formatting to work with interface nodes

* fixed edge direction issue

* Created pane for AI answers tab

* AI working (partially)

* plant uml

* ai chatbox update

* Implemented AI

* Implemented AI properly

* integrated guardrails

* guardrails changes

* updated ai/guardlines on frontend

---------

Co-authored-by: ThammathornP <[email protected]>
Co-authored-by: Harsimar Singh <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent c362330 commit d4555c1
Show file tree
Hide file tree
Showing 27 changed files with 12,178 additions and 2,680 deletions.
21 changes: 21 additions & 0 deletions client/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.cjs"],
testMatch: ["**/__tests__/**/*.test.[jt]s?(x)"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "cjs"],
transform: {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
useESM: true,
},
],
},
extensionsToTreatAsEsm: [".ts", ".tsx"],
moduleDirectories: ["node_modules", "src"],
};
17 changes: 17 additions & 0 deletions client/jest.setup.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require("@testing-library/jest-dom");

// Mock localStorage for testing
const mockLocalStorage = {
getItem: jest.fn(),
setItem: jest.fn(),
clear: jest.fn(),
removeItem: jest.fn(),
};
global.localStorage = mockLocalStorage;

// Mock ResizeObserver
global.ResizeObserver = class ResizeObserver {
observe() {}
unobserve() {}
disconnect() {}
};
Loading

0 comments on commit d4555c1

Please sign in to comment.