/
matchers.cljs
32 lines (30 loc) · 1.25 KB
/
matchers.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(ns cljest.matchers
(:require-macros [cljest.matchers :refer [defmatcher]]))
; jest.fn
(defmatcher called? "toHaveBeenCalled")
(defmatcher called-times? "toHaveBeenCalledTimes")
(defmatcher called-with? "customCalledWith")
; jest-dom
(defmatcher disabled? "toBeDisabled")
(defmatcher enabled? "toBeEnabled")
(defmatcher empty-dom-element? "toBeEmptyDOMElement")
(defmatcher in-the-document? "toBeInTheDocument")
(defmatcher invalid? "toBeInvalid")
(defmatcher required? "toBeRequired")
(defmatcher valid? "toBeValid")
(defmatcher visible? "toBeVisible")
(defmatcher contains-element? "toContainElement")
(defmatcher contains-html? "toContainHTML")
(defmatcher has-attribute? "toHaveAttribute")
(defmatcher has-class? "toHaveClass")
(defmatcher has-focus? "toHaveFocus")
(defmatcher has-style? "toHaveStyle")
(defmatcher has-text-content? "toHaveTextContent")
(defmatcher has-value? "toHaveValue")
(defmatcher has-display-value? "toHaveDisplayValue")
(defmatcher checked? "toBeChecked")
(defmatcher partially-checked? "toBePartiallyChecked")
(defmatcher has-error-msg? "toHaveErrorMessage")
(defmatcher has-accessible-description? "toHaveAccessibleDescription")
(defmatcher has-accessible-name? "toHaveAccessibleName")
(defmatcher has-attr? "toHaveAttribute")