Ad
  • Custom User Avatar

    If you have problems with tests, I mean issues like this:

    Process was terminated. It took longer than 12000ms to complete
    

    – so you shoud optimize your code. I've had this problem, and it did help.

  • Custom User Avatar

    Proper tests:

    fluffy = new Cat('fluffy', 15);
    garfield = new Cat('garfield', 25);
    
    
    Test.assertEquals(fluffy.weight, 15);
    Test.assertEquals(fluffy instanceof Cat, true);
    Test.assertEquals(fluffy.averageWeight, undefined);
    Test.assertEquals(typeof Cat.averageWeight, "function");
    Test.assertEquals(Cat.averageWeight(), 20);