Ability to launch unit tests using carma and webpack

This commit is contained in:
boryslevytskyi
2017-05-13 21:06:35 +03:00
parent f6d9efd1b8
commit 1bd9eb2f97
9 changed files with 66 additions and 55 deletions

View File

@@ -34,11 +34,7 @@ var expression = {
},
addFactory: function(factory) {
this.factories.push(factory);
},
Operand:Operand,
SingleOperandExpression: SingleOperandExpression,
ListOfNumbersExpression: ListOfNumbersExpression,
MultipleOperandsExpression: MultipleOperandsExpression
}
};
// List of numbers

View File

@@ -8,15 +8,16 @@ export default {
getArgs: function (hashValue) {
var decodedHash = this.decodeHash(hashValue),
args = [];
args = { commands: [] };
splitHashList(decodedHash).forEach(function(value) {
// Support for -debur or -notrack properties
if(/^\-[a-zA-Z]+$/.test(value)) {
args[value.substr(1)] = true;
return;
}
args.push(value);
args.commands.push(value);
});
return Object.freeze(args);

View File

@@ -20,8 +20,9 @@ console.log("appState", appState);
var hashArgs = hash.getArgs(window.location.hash);
var startupCommands = ['help', '1|2&6','1<<0x2a','2 4 8 16 32'];
if(hashArgs.length > 0) {
startupCommands = hashArgs;
if(hashArgs.commands.length > 0) {
startupCommands = hashArgs.commands;
}
startupCommands.forEach(cmd.execute.bind(cmd));