Ad
  • Custom User Avatar

    In Javascript:

    function somefunction() { return true; }
    
    Test.describe("This test", function() {
      Test.it("should return true", function() {
        Test.assertEquals(somefunction(), true);
      })
    })
    

    Result

    This test:
      should return true:
        Test Passed: Value == true
    

    Codewars should insert something like this as a default example for javascript :) In case you want more details, have a look at the javascript kata-test-framework repository on github