Socket
Book a DemoInstallSign in
Socket

jasmine2-atom-matchers

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine2-atom-matchers

Custom matchers from Atom

latest
Source
npmnpm
Version
1.1.10
Version published
Weekly downloads
46
12.2%
Maintainers
1
Weekly downloads
 
Created
Source

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)

Keywords

jasmine

FAQs

Package last updated on 27 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts