Socket
Socket
Sign inDemoInstall

casper-chai

Package Overview
Dependencies
0
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.6 to 0.1.7

docs/casper-chai.md

9

package.json

@@ -10,3 +10,3 @@ {

],
"version": "0.1.6",
"version": "0.1.7",
"author": "Brian M Hunt <brianmhunt@gmail.com>",

@@ -24,3 +24,3 @@ "license": "MIT",

},
"main": "./build/casper-chai.js",
"main": "./lib/casper-chai.coffee",
"scripts": {

@@ -30,8 +30,7 @@ "test": "cake test",

},
"dependencies": {
"lodash": ">= 0.8"
},
"devDependencies": {
"lodash": ">= 0.8",
"icolor": "*",
"chai": ">= 1.3.0",
"mocha": ">= 1.13.0",
"glob": "*",

@@ -38,0 +37,0 @@ "semver": "*",

@@ -28,3 +28,4 @@ # Casper.JS Assertions for Chai [![Build Status](https://secure.travis-ci.org/brianmhunt/casper-chai.png?branch=master)](https://travis-ci.org/brianmhunt/casper-chai)

<th>Name</th>
<th>Description</th>
<th>Description - passes when ...</th>
<th>Example</th>
</thead>

@@ -34,20 +35,19 @@ <tbody>

<td><a href='casper-chai/blob/master/build/casper-chai.md#attr'>attr(attr_name)</a></td>
<td>True when one selector has the given attribute
</td>
<td>exactly one element matching the selector has the given attribute</td>
<td>expect("#header_a").to.have.attr('target')</td>
</tr>
<tr>
<td><a href='casper-chai/blob/master/build/casper-chai.md#attrany'>attrAny(attr_name)</a></td>
<td>True when any selector has the given attribute
</td>
<td>any element matching the selector has the given attribute</td>
<td>expect(".menu div").to.have.attr('data-bind')</td>
</tr>
<tr>
<td><a href='casper-chai/blob/master/build/casper-chai.md#attrall'>attrAll(attr_name)</a></td>
<td>True when all elements matching selector have the given attribute
</td>
<td>all elements matching selector have the given attribute</td>
<td>expect('.menu div a').to.have.attr('href')</td>
</tr>
<tr>
<td><a href='casper-chai/blob/master/build/casper-chai.md#fieldvalue'>fieldValue(value)</a></td>
<td>
the named input provided has the given value
</td>
<td>the named input provided has the given value</td>
<td>"field_name".should.have.fieldValue("someValue")</td>
</tr>

@@ -57,2 +57,3 @@ <tr>

<td>when the given selector is in the DOM</td>
<td>expect('#header').to.be.inDOM</td>
</tr>

@@ -62,2 +63,3 @@ <tr>

<td>when the given resource exists</td>
<td>expect('styles.css').to.be.loaded</td>
</tr>

@@ -67,2 +69,3 @@ <tr>

<td>the current URL matches</td>
<td>expect(/https:\/\//).to.matchCurrentUrl
</tr>

@@ -72,2 +75,3 @@ <tr>

<td>compare the remote evaluation to the given expression</td>
<td>expect("typeof jQuery").to.matchOnRemote('undefined')</td>
</tr>

@@ -77,2 +81,3 @@ <tr>

<td>the current Title matches</td>
<td>expect(/Google/).to.matchTitle</td>
</tr>

@@ -82,2 +87,3 @@ <tr>

<td>all elements matching the selectors are one of the given tags</td>
<td>expect('.menu *').to.have.tagName(['div', 'span'])</td>
</tr>

@@ -87,2 +93,3 @@ <tr>

<td>the text can be found in the DOM</td>
<td>expect('About google').to.be.textInDOM</td>
</tr>

@@ -92,5 +99,5 @@ <tr>

<td>
the text of the given selector matches the expression (a string
or regular expression).
the text of the given selector matches the expression (a string or regular expression).
</td>
<td>expect('#my_header').to.have.textMatch("My Header")</td>
</tr>

@@ -100,2 +107,3 @@ <tr>

<td>the remote expression evaluates to something truthy</td>
<td>expect("true").to.be.trueOnRemote</td>
</tr>

@@ -105,2 +113,3 @@ <tr>

<td>the selector matches a visible element</td>
<td>expect('#my_header').to.be.visible</td>
</tr>

@@ -110,3 +119,3 @@ </tbody>

More [documentation and examples](casper-chai/blob/master/build/casper-chai.md).
More [documentation and examples](https://github.com/brianmhunt/casper-chai/blob/master/build/casper-chai.md).

@@ -135,13 +144,7 @@ For even more examples, if you are cool with

### AMD
Casper–Chai supports being used as an [AMD][] module, registering itself
anonymously (just like Chai).
[CasperJS]: http://casperjs.org/
[Chai]: http://chaijs.com/
[Mocha]: http://visionmedia.github.com/mocha/
[AMD]: https://github.com/amdjs/amdjs-api/wiki/AMD
[npm]: https://npmjs.org/
[Tester]: http://casperjs.org/api.html#tester

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc