make boilder plate react test happy with new dependencies
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
},
|
||||
"jest": {
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!(three)/)"
|
||||
"node_modules/(?!(three|allotment)/)"
|
||||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
@ -1,9 +1,19 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import App from './App';
|
||||
import React from "react";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import App from "./App";
|
||||
|
||||
test('renders learn react link', () => {
|
||||
let listener: ((rect: any) => void) | undefined = undefined;
|
||||
(global as any).ResizeObserver = class ResizeObserver {
|
||||
constructor(ls: ((rect: any) => void) | undefined) {
|
||||
listener = ls;
|
||||
}
|
||||
observe() {}
|
||||
unobserve() {}
|
||||
disconnect() {}
|
||||
};
|
||||
|
||||
test("renders learn react link", () => {
|
||||
render(<App />);
|
||||
const linkElement = screen.getByText(/learn react/i);
|
||||
const linkElement = screen.getByText(/viewer/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
});
|
||||
|
@ -2,7 +2,7 @@ import React, { useRef, useState, useEffect } from "react";
|
||||
import { Canvas } from "@react-three/fiber";
|
||||
import { Allotment } from "allotment";
|
||||
import { OrbitControls, OrthographicCamera } from "@react-three/drei";
|
||||
import "allotment/dist/style.css";
|
||||
// import "allotment/dist/style.css";
|
||||
import { lexer } from "./lang/tokeniser";
|
||||
import { abstractSyntaxTree } from "./lang/abstractSyntaxTree";
|
||||
import { executor } from "./lang/executor";
|
||||
|
@ -2,6 +2,8 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@import '../node_modules/allotment/dist/style.css';
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
|
Reference in New Issue
Block a user