Files
elasticsearch-js/test/unit/specs/yaml_test_reader.js
Spencer 7c1573fb07 Use standard and prettier (#10)
* switch from custom eslint config to standard + prettier

* fix new standard eslint violations

* add editorconfig file

* auto-fix all other violations

* update lint yarn script

* remove jshint comment
2019-07-09 13:24:13 -07:00

23 lines
909 B
JavaScript

describe('Yaml Test Reader', function() {
var YamlDoc = require('../../integration/yaml_suite/yaml_doc');
var compare = YamlDoc.compareRangeToVersion;
var expect = require('expect.js');
describe('version range comparison', function() {
it('supports unbounded ranges', function() {
expect(compare(' - ', '999999999999999999')).to.be(true);
expect(compare('0 - ', '999999999999999999')).to.be(true);
expect(compare(' - 1', '999999999999999999')).to.be(false);
});
it('supports bound ranges', function() {
expect(compare('1.4 - 1.5', '1.4.4')).to.be(true);
expect(compare('1.4.4 - 1.5', '1.4.4')).to.be(true);
expect(compare('1.4 - 1.4.4', '1.4.4')).to.be(true);
expect(compare('1.4 - 1.4.3', '1.4.4')).to.be(false);
expect(compare('0.90 - 1.2', '1.0')).to.be(true);
expect(compare('0.90 - 1.2', '1.4')).to.be(false);
});
});
});