-
-
Save reime005/47800b2daab1a1fb38a4a0e7e8051637 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* src/store/__tests__/ui.test.js */ | |
import React from "react"; | |
import Enzyme, { shallow } from "enzyme"; | |
import Adapter from "enzyme-adapter-react-16"; | |
import { Home } from "../../Home"; | |
Enzyme.configure({ adapter: new Adapter() }); | |
it('should display counter value "42"', () => { | |
const app = shallow(<Home counter={42} />); | |
const counter = app.find({ id: "testCounter" }); | |
expect(counter.text()).toEqual("42"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment