mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
Fix failing unit tests in browser (#5688)
* format js files using prettier Used the following command to format the files prettier --write "browser/app/js/**/*.js" * fix failing unit tests in browser
This commit is contained in:
committed by
Harshavardhana
parent
cb3818be27
commit
c0e45f9098
@@ -26,16 +26,16 @@ describe("Bucket", () => {
|
||||
it("should call selectBucket when clicked", () => {
|
||||
const selectBucket = jest.fn()
|
||||
const wrapper = shallow(
|
||||
<Bucket bucket={"test"} selectBucket={selectBucket} />,
|
||||
<Bucket bucket={"test"} selectBucket={selectBucket} />
|
||||
)
|
||||
wrapper.find("li").simulate("click", {
|
||||
preventDefault: jest.fn(),
|
||||
wrapper.find("div").simulate("click", {
|
||||
preventDefault: jest.fn()
|
||||
})
|
||||
expect(selectBucket).toHaveBeenCalledWith("test")
|
||||
})
|
||||
|
||||
it("should highlight the selected bucket", () => {
|
||||
const wrapper = shallow(<Bucket bucket={"test"} isActive={true} />)
|
||||
expect(wrapper.find("li").hasClass("active")).toBeTruthy()
|
||||
expect(wrapper.find("div").hasClass("buckets__item--active")).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user