UNPKG

@aeternity/aepp-sdk

Version:
30 lines (28 loc) 1.38 kB
/* * ISC License (ISC) * Copyright (c) 2018 aeternity developers * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ import { expect } from 'chai' import { describe, it } from 'mocha' import semverSatisfies from '../../es/utils/semver-satisfies' describe('semverSatisfies', () => { it('returns a proper value', () => { expect(semverSatisfies('1.0.0', '1.0.0', '1.0.1')).to.equal(true) expect(semverSatisfies('1.0.0', '1.0.1', '1.0.2')).to.equal(false) expect(semverSatisfies('2.4.0', '1.4.0', '3.0.0')).to.equal(true) expect(semverSatisfies('2.4.0', '2.5.0', '3.0.0')).to.equal(false) expect(semverSatisfies('1.9.0', '2.0.0', '3.0.0')).to.equal(false) }) })