add versions to test args and version getters to config
This commit is contained in:
parent
e63386e9eb
commit
817a4a03b6
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue