@applicaster/zapp-react-native-ui-components
Version:
Applicaster Zapp React Native ui components for the Quick Brick App
46 lines (33 loc) • 1.14 kB
JavaScript
import { getEntryState } from "..";
describe("getEntryState", () => {
it("state=default and not selected", () => {
const state = "default";
const isSelected = false;
expect(getEntryState(state, isSelected)).toEqual("default");
});
it("state=default and selected", () => {
const state = "default";
const isSelected = true;
expect(getEntryState(state, isSelected)).toEqual("selected");
});
it("state=selected and not selected", () => {
const state = "selected";
const isSelected = false;
expect(getEntryState(state, isSelected)).toEqual("selected");
});
it("state=selected and selected", () => {
const state = "selected";
const isSelected = true;
expect(getEntryState(state, isSelected)).toEqual("selected");
});
it("focused and not selected", () => {
const state = "focused";
const isSelected = false;
expect(getEntryState(state, isSelected)).toEqual("focused");
});
it("focused and selected", () => {
const state = "focused";
const isSelected = true;
expect(getEntryState(state, isSelected)).toEqual("focused_selected");
});
});