Code coverage report for src/sequenceDb.js

Statements: 100% (17 / 17)      Branches: 100% (0 / 0)      Functions: 100% (6 / 6)      Lines: 100% (17 / 17)      Ignored: none     

All files » src/ » sequenceDb.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33      1 1 1 1   10 10     1   2     1 2     1 6     1 1     1 8 8  
/**
 * Created by knut on 14-11-19.
 */
var actors = {};
var actorKeys = [];
var messages = [];
exports.addActor = function(id,name,description){
    //console.log('Adding actor: '+id);
    actors[id] = {name:name, description:description};
    actorKeys.push(id);
};
 
exports.addMessage = function(idFrom, idTo, message,  answer){
    //console.log('Adding message from='+idFrom+' to='+idTo+' message='+message+' answer='+answer);
    messages.push({from:idFrom, to:idTo, message:message, answer:answer});
};
 
exports.getMessages = function(){
    return messages;
};
 
exports.getActors = function(){
    return actors;
};
 
exports.getActorKeys = function(){
    return actorKeys;
};
 
exports.clear = function(){
    actors = {};
    messages = [];
};