unit testing

Post your help queries and engine programming questions here

unit testing

Postby TheBenji » Mon Dec 01, 2014 2:33 pm

Hey,

do you guys do any kind of unit testing for your games?
If so, do you mind sharing your experiences? What works well for you and what doesn't? Frameworks you are using and so on :)

Cheers
TheBenji
 
Posts: 7
Joined: Sat Nov 22, 2014 8:42 pm

Re: unit testing

Postby robaldred » Tue Feb 17, 2015 10:01 pm

Hey
I use grunt and the grunt-mocha-cli module, which allows you to run mochajs with grunt
Checkout the docs here: http://mochajs.org/

It allows you to write tests like this:

Code: Select all
describe('Array', function(){
  describe('#indexOf()', function(){
    it('should return -1 when the value is not present', function(){
      [1,2,3].indexOf(5).should.equal(-1);
      [1,2,3].indexOf(0).should.equal(-1);
    })
  })
})
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England


Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron