ReferenceError: can't find variable x when using grunt test in yeoman
问题 I'm using yeoman, grunt, mocha. I want to do BDD so I make basic unit test and run grunt test in console, which gives me ReferenceError: can't find variable: Creature opening test/index.html in browser works as it should. This is my creature.js file in app/scripts: 'use strict'; var Creature = (function () { function Creature(name) { this.name = name; } Creature.prototype.sayHello = function (message) { return this.name + ' ' + message; }; Creature.prototype.eat = function (item){ return this