Skip to content

Instantly share code, notes, and snippets.

@shichen85
Last active March 11, 2021 14:47
Show Gist options
  • Save shichen85/bff2ca084ecf7929a196c69db772efe4 to your computer and use it in GitHub Desktop.
Save shichen85/bff2ca084ecf7929a196c69db772efe4 to your computer and use it in GitHub Desktop.
Code snippet for the quick start demo in README.md
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