chai-semver
Semver plugin for Chai
Installation
npm install -D chai-semver
Then setup your unit test:
const chai = const chaiSemver = chai
Assertions
tobe // passes if given string is in semver format, rejects if not'1.6.3'shouldbe // equivalentto // passes if given string is in given version range, rejects if not
License
This plugin is being released under MIT license.