Last active
March 11, 2021 14:47
-
-
Save shichen85/bff2ca084ecf7929a196c69db772efe4 to your computer and use it in GitHub Desktop.
Code snippet for the quick start demo in README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function demo_olympus_quick_start(){ | |
//Name your test suite | |
olympus_run("my suite name", function(){ | |
//Name your unit test and add it to the suite | |
olympus_add_test("my unit test name", function(){ | |
//Define the test assertion logic | |
var expected = "2"; | |
var actual = "1"; | |
if (actual != expected){ | |
throw({ | |
message: "Expected: " + expected + ". Actual: " + actual, | |
stacktrace: debug_get_callstack() | |
}); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment