chai-semver

    1.0.2 • Public • Published

    chai-semver

    Build Status Coverage Status npm version FOSSA Status

    Semver plugin for Chai

    Installation

    npm install -D chai-semver
    

    Then setup your unit test:

    const chai = require('chai')
    const chaiSemver = require('chai-semver')
     
    chai.use(chaiSemver)
     

    Assertions

    expect('1.2.0').to.be.semver() // passes if given string is in semver format, rejects if not
    '1.6.3'.should.be.semver() // equivalent
    expect('1.2.0').to.satisfySemver('>1.0.3') // passes if given string is in given version range, rejects if not

    License

    This plugin is being released under MIT license.

    FOSSA Status

    Install

    npm i chai-semver

    DownloadsWeekly Downloads

    40

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    73.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • sofalse