Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Examples

Here we have 3 examples:

  • JavaScript
  • Python
  • Java

JavaScript

Observed testing functions:

Test.assertEquals(hello(), "hello edabit.com", "Did you *return* the result?");
Test.assertSimilar(reverse([1, 2, 3, 4]), [4, 3, 2, 1]);
Test.expect(validate("5578"), "5578 is even.");
Test.assertDeepEquals(invert({ a: 1, b: 2, c: 3 }), { 1: "a", 2: "b", 3: "c" });

Edge case chai import (edabitId): goPXhZwywzpkZFx3A

Python

Observed testing functions:

Test.assert_equals(addition(2), 3, "2 plus 1 equals 3.")

Java

JUnit Framework