Add missing unit tests to JavaScript and React components (#5505)

Add the missing unit tests login, bucket listing, and bucket searching functionalities.
This commit is contained in:
Kaan Kabalak
2018-02-12 13:27:52 -08:00
committed by Harshavardhana
parent feb726dd98
commit ead6337eab
14 changed files with 354 additions and 31 deletions

View File

@@ -27,7 +27,7 @@ describe("buckets reducer", () => {
})
})
it("should handle SET_BUCKETS", () => {
it("should handle SET_LIST", () => {
const newState = reducer(undefined, {
type: actions.SET_LIST,
buckets: ["bk1", "bk2"]
@@ -35,7 +35,7 @@ describe("buckets reducer", () => {
expect(newState.list).toEqual(["bk1", "bk2"])
})
it("should handle SET_BUCKETS_FILTER", () => {
it("should handle SET_FILTER", () => {
const newState = reducer(undefined, {
type: actions.SET_FILTER,
filter: "test"
@@ -43,7 +43,7 @@ describe("buckets reducer", () => {
expect(newState.filter).toEqual("test")
})
it("should handle SELECT_BUCKET", () => {
it("should handle SET_CURRENT_BUCKET", () => {
const newState = reducer(undefined, {
type: actions.SET_CURRENT_BUCKET,
bucket: "test"