chai-match
Advanced RegExp assertions for Chai.js
Last updated 5 years ago by johngeorgewright .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install chai-match 
SYNC missed versions from official npm registry.

Chai Match

Advanced RegExp assertions for Chai.js.

Installation

npm i --save-dev chai-match
var chai = require('chai');
chai.use(require('chai-match'));

API

.capture(n)

Sets the assertion object to a previous match's capture.

expect('some thing to test').to.match(/some (\w+) to test/).and.capture(0).equals('thing');
'Here in London'.should.match(/(here|there) in (\w+)/i).and.capture(1).equals('London');

Current Tags

  • 1.1.1                                ...           latest (5 years ago)

4 Versions

  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 7
This Month 41
Last Day 3
Last Week 22
Last Month 92
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |