mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-20 10:52:43 +01:00
Ability to launch unit tests using carma and webpack
This commit is contained in:
@@ -34,11 +34,7 @@ var expression = {
|
||||
},
|
||||
addFactory: function(factory) {
|
||||
this.factories.push(factory);
|
||||
},
|
||||
Operand:Operand,
|
||||
SingleOperandExpression: SingleOperandExpression,
|
||||
ListOfNumbersExpression: ListOfNumbersExpression,
|
||||
MultipleOperandsExpression: MultipleOperandsExpression
|
||||
}
|
||||
};
|
||||
|
||||
// List of numbers
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user