jasmine2-atom-matchers

1.1.10 • Public • Published

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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.1068latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.1068
1.1.928
1.1.80
1.1.714
1.1.60
1.1.54
1.1.46
1.1.30
1.1.20
1.1.10
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i jasmine2-atom-matchers

Weekly Downloads

103

Version

1.1.10

License

MIT

Unpacked Size

37.9 kB

Total Files

16

Last publish

Collaborators

  • tonybrix