Code coverage report for api/datum/Stimulus.js

Statements: 50% (8 / 16)      Branches: 50% (1 / 2)      Functions: 11.11% (1 / 9)      Lines: 50% (8 / 16)      Ignored: none     

All files » api/datum/ » Stimulus.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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 931                   1 2 2   2 2     1                                                                                                                                                 1  
var LanguageDatum = require("./LanguageDatum").LanguageDatum;
 
/**
 * @class The Stimulus is a minimal customization of a LanguageDatum which allows the user to add additional information
 *  which can be used for experiments.
 *
 * @name  Stimulus
 * @extends LanguageDatum
 * @constructs
 */
var Stimulus = function Stimulus(options) {
  Eif (!this._fieldDBtype) {
    this._fieldDBtype = "Stimulus";
  }
  this.debug("Constructing Stimulus ", options);
  LanguageDatum.apply(this, arguments);
};
 
Stimulus.prototype = Object.create(LanguageDatum.prototype, /** @lends Stimulus.prototype */ {
  constructor: {
    value: Stimulus
  },
 
  prime: {
    get: function() {
      // if (this._prime) {
      return this._prime;
      // }
      // return {
      //   "imageFile": "x.png",
      //   "utterance": "χχ",
      //   "orthography": "xx",
      //   "audioFile": "prime.mp3"
      // };
    },
    set: function(value) {
      this._prime = value;
    }
  },
 
  target: {
    get: function() {
      // if (this._target) {
      return this._target;
      // }
      // return {
      //   "imageFile": "x.png",
      //   "utterance": "χχ",
      //   "orthography": "x",
      //   "audioFile": "target.mp3"
      // };
    },
    set: function(value) {
      this._target = value;
    }
  },
 
  distractors: {
    get: function() {
      // if (this._distractors) {
      return this._distractors;
      // }
      // return [{
      //   "imageFile": "placeholder.jpg",
      //   "utterance": "ʁχχ",
      //   "orthography": "rxx",
      //   "audioFile": "distractor.mp3"
      // }];
    },
    set: function(value) {
      this._distractors = value;
    }
  },
 
  layout: {
    get: function() {
      // if (this._layout) {
      return this._layout;
      // }
      // return {
      //   randomize: false,
      //   visualChoiceA: this.target,
      //   visualChoiceB: this.distractors[0]
      // };
    },
    set: function(value) {
      this._layout = value;
    }
  }
 
});
exports.Stimulus = Stimulus;