add versions to test args and version getters to config

This commit is contained in:
Jiiks 2019-03-05 12:56:19 +02:00
parent e63386e9eb
commit 817a4a03b6
2 changed files with 22 additions and 2 deletions

View File

@ -11,8 +11,20 @@
const TESTS = typeof PRODUCTION === 'undefined';
const TEST_ARGS = () => {
const _basePath = path.resolve(__dirname, '..', '..');
const _baseDataPath = path.resolve(_basePath, 'tests');
const _baseDataPath = path.resolve(_basePath, 'tests');
const _corePkg = require(path.resolve(_basePath, 'core', 'package.json'));
const _clientPkg = require(path.resolve(_basePath, 'client', 'package.json'));
const _editorPkg = require(path.resolve(_basePath, 'editor', 'package.json'));
const coreVersion = _corePkg.version;
const clientVersion = _clientPkg.version;
const editorVersion = _editorPkg.version;
return {
coreVersion,
clientVersion,
editorVersion,
'options': {
'autoInject': true,
'commonCore': true,

View File

@ -16,8 +16,16 @@ export default class Config extends Module {
return this.args.version;
}
get coreVersion() {
return this.state.coreVersion;
}
get clientVersion() {
return this.args.clientVersion;
return this.state.clientVersion;
}
get editorVersion() {
return this.state.editorVersion;
}
setClientVersion(clientVersion) {