mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
working javascript tests
adds some arguments to unit tests to get around some windows shenanigans and adds enzyme to the project for use in testing
This commit is contained in:
1 parent
7e2fb07d67
commit
46e836a913
4 files changed
+368
-27
No files matched your search
+10
-7
@@ -1,9 +1,12 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import App from './App';
|
||||
import React from "react";
|
||||
import { RecoilRoot } from "recoil";
|
||||
import { shallow } from "enzyme";
|
||||
import Phone from "./Phone";
|
||||
|
||||
test('renders learn react link', () => {
|
||||
const { getByText } = render(<App />);
|
||||
const linkElement = getByText(/learn react/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
it("renders Phone", () => {
|
||||
shallow(
|
||||
<RecoilRoot>
|
||||
<Phone />
|
||||
</RecoilRoot>
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user