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
@@ -35,13 +35,13 @@ describe("BucketDropdown", () => {
|
||||
it("should call showBucketPolicy when Edit Policy link is clicked", () => {
|
||||
const showBucketPolicy = jest.fn()
|
||||
const wrapper = shallow(
|
||||
<BucketDropdown showBucketPolicy={showBucketPolicy} />,
|
||||
<BucketDropdown showBucketPolicy={showBucketPolicy} />
|
||||
)
|
||||
wrapper
|
||||
.find("li a")
|
||||
.find("MenuItem")
|
||||
.at(0)
|
||||
.simulate("click", {
|
||||
stopPropagation: jest.fn(),
|
||||
stopPropagation: jest.fn()
|
||||
})
|
||||
expect(showBucketPolicy).toHaveBeenCalled()
|
||||
})
|
||||
@@ -49,13 +49,13 @@ describe("BucketDropdown", () => {
|
||||
it("should call deleteBucket when Delete link is clicked", () => {
|
||||
const deleteBucket = jest.fn()
|
||||
const wrapper = shallow(
|
||||
<BucketDropdown bucket={"test"} deleteBucket={deleteBucket} />,
|
||||
<BucketDropdown bucket={"test"} deleteBucket={deleteBucket} />
|
||||
)
|
||||
wrapper
|
||||
.find("li a")
|
||||
.find("MenuItem")
|
||||
.at(1)
|
||||
.simulate("click", {
|
||||
stopPropagation: jest.fn(),
|
||||
stopPropagation: jest.fn()
|
||||
})
|
||||
expect(deleteBucket).toHaveBeenCalledWith("test")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user