mirror of https://github.com/status-im/consul.git
ui/fix linting error and failing ui test (#15953)
* fix linting error * Fix the failing version test as well
This commit is contained in:
parent
5d3643f4f0
commit
cc45c3c044
|
@ -11,8 +11,7 @@ const repositorySHA = function (sha = exec('git rev-parse --short HEAD')) {
|
||||||
const binaryVersion = function (repositoryRoot) {
|
const binaryVersion = function (repositoryRoot) {
|
||||||
return function (versionFileContents = read(`${repositoryRoot}/version/VERSION`)) {
|
return function (versionFileContents = read(`${repositoryRoot}/version/VERSION`)) {
|
||||||
// see /scripts/dist.sh:8
|
// see /scripts/dist.sh:8
|
||||||
return versionFileContents
|
return versionFileContents.toString();
|
||||||
.toString()
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
const env = function ($) {
|
const env = function ($) {
|
||||||
|
|
|
@ -11,14 +11,8 @@ test('utils.respositoryYear parses the year out correctly', function (t) {
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
test('utils.binaryVersion parses the version out correctly', function (t) {
|
test('utils.binaryVersion parses the version out correctly', function (t) {
|
||||||
const expected = '1.9.0';
|
const expected = '1.15.0-dev';
|
||||||
const actual = utils.binaryVersion()(`
|
const actual = utils.binaryVersion()(`1.15.0-dev`);
|
||||||
|
|
||||||
Version = "1.9.0"
|
|
||||||
|
|
||||||
VersionPrerelease = "dev"
|
|
||||||
|
|
||||||
`);
|
|
||||||
t.equal(actual, expected, 'It parses the version correctly');
|
t.equal(actual, expected, 'It parses the version correctly');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue