1.1.10 • Published 2 years ago

jasmine2-atom-matchers v1.1.10

Weekly downloads
726
License
MIT
Repository
github
Last release
2 years ago

Actions Status

Jasmine 2.x-3.x Atom Matchers

This will add the matchers from Atom for Jasmine 2.x or 3.x

install

npm install --save-dev jasmine2-atom-matchers
// in your jasmine helpers.js
require("jasmine2-atom-matchers")

Matchers

toBeInstanceOf(Class)

Matches if expected is an instance of Class

toHaveLength(length)

Matches if expected.length === length

toExistOnDisk()

Matches if expected path exists

toHaveFocus()

Matches if expected element has focus

toShow()

Matches if expected element is not display: none;

toEqualPath(path)

Matches if normalized expected path === normalized path

toHaveClass(className)

Matches if $(element).hasClass(className)

toBeVisible()

Matches if $(element).is(":visible")

toBeHidden()

Matches if $(element).is(":hidden")

toBeSelected()

Matches if $(element).is(":selected")

toBeChecked()

Matches if $(element).is(":checked")

toBeEmpty()

Matches if $(element).is(":empty")

toBeDisabled()

Matches if $(element).is(":disabled")

toExist()

Matches if $(element).length > 0

toHaveAttr(attrName, attrValue)

Matches if $(element).attr(attrName) !== undefined and optionally $(element).attr(attrName) === attrValue

toHaveId(id)

Matches if $(element).attr("id") === id

toHaveHtml(html)

Matches if $(element).html() === html

toHaveText(text)

Matches if $(element).text() === text

toHaveValue(value)

Matches if $(element).val() === value

toHaveData(dataKey, dataValue)

Matches if $(element).data(dataKey) !== undefined and optionally $(element).data(dataKey) === dataValue

toMatchSelector(selector)

Matches if $(element).is(selector)

toContain(element|selector)

Matches if $(element).find(element|selector).length > 0

toHandle(eventName)

Matches if $(element).on(eventName)

toHandleWith(eventName, eventHandler)

Matches if $(element).on(eventName, eventHandler)

1.1.10

2 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago