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 0f055f6
Show file tree
Hide file tree
Showing 26 changed files with 176 additions and 427 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
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 0f055f6

Please sign in to comment.