Skip to content

Commit

Permalink
Move library source to memory-viz workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu committed Apr 16, 2024
1 parent becfe7b commit 9a22dcb
Show file tree
Hide file tree
Showing 27 changed files with 173 additions and 428 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
cache: npm
- name: Install npm packages
run: npm ci
- name: Build
run: npm run build-dev
- name: Run jest tests
run: npm run test-cov
- name: Coveralls (jest)
Expand Down
2 changes: 1 addition & 1 deletion demo/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const config: Config = {
// maxWorkers: "50%",

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: ["node_modules", "../src", "../dist"],
moduleDirectories: ["node_modules", ".."],

// An array of file extensions your modules use
// moduleFileExtensions: [
Expand Down
1 change: 1 addition & 0 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@mui/icons-material": "^5.15.14",
"@mui/material": "^5.15.7",
"@picocss/pico": "^1.5.10",
"memory-viz": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.12"
Expand Down
2 changes: 1 addition & 1 deletion demo/src/SvgDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef, useEffect } from "react";
import mem from "../../src/index"; // TODO: replace with import of the package after it's been published
import mem from "memory-viz";
import { configDataPropTypes } from "./MemoryModelsUserInput";

type SvgDisplayPropTypes = {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/__tests__/App.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import App from "../App";
import mem from "../../../src/index";
import mem from "memory-viz";

describe("App", () => {
beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions demo/src/__tests__/SvgDisplay.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import SvgDisplay from "../SvgDisplay";
import mem from "../../../src/index";
import mem from "memory-viz";
const { draw } = mem;

const mockMemoryModels = {
Expand All @@ -10,7 +10,7 @@ const mockMemoryModels = {
render: jest.fn(),
};

jest.mock("../../../src/index", () => ({
jest.mock("memory-viz", () => ({
draw: jest.fn(() => mockMemoryModels),
}));

Expand Down
1 change: 1 addition & 0 deletions demo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = [
externals: {
fs: "fs",
},
externalsType: "window",
plugins: [
new HtmlWebpackPlugin({
title: "MemoryViz Demo",
Expand Down
Loading

0 comments on commit 9a22dcb

Please sign in to comment.