diff --git a/README.md b/README.md index 0e60dbe..0e76fb4 100644 --- a/README.md +++ b/README.md @@ -6,47 +6,55 @@ A ridiculously lightweight, dependency-free, in-browser JavaScript testing suite * Step 2.) Run your tests (tests.assertEquals('1+1=2',2,'1+1')). * Step 3.) Display the results (tests.testResults()). -## Tests -### assert(testName, value, info = '') +## Methods +### Tests +**assert(testName, value, info = '')** + Test if the passed value is true. * @param {string} testName Name of your test (i.e. 'multiplicationTest'). * @param {any} value Value to be tested for truthiness (i.e. false). * @param {string} info Optional human-readable information to display in test logs (i.e. 'Does 4 * 3 = 12?'). -### assertEquals(testName, expected, actual, info = '') -Test if passed value is equal to the expected value. +**assertEquals(testName, expected, actual, info = '')** + +Test if the passed value is equal to the expected value. * @param {string} testName Name of your test (i.e. 'multiplicationTest'). * @param {any} expected What the value should be (i.e. 7). * @param {any} actual The value to be tested (i.e. 8). * @param {string} info Optional human-readable information to display in test logs (i.e. 'Does 4 * 3 = 12?'). -### assertStrictEquals(testName, expected, actual, info = '') -Test if passed value is equal to and of the same type as the expected value. +**assertStrictEquals(testName, expected, actual, info = '')** + +Test if the passed value is equal to and of the same type as the expected value. * @param {string} testName Name of your test (i.e. 'multiplicationTest'). * @param {any} expected What the value should be (i.e. 7). * @param {any} actual The value to be tested (i.e. 8). * @param {string} info Optional human-readable information to display in test logs (i.e. 'Does 4 * 3 = 12?'). -## Directly pass or fail without a test -### pass(testName, testType, msg) +### Directly pass or fail without a test +**pass(testName, testType, msg)** + Log a success directly without using a test method. * @param {string} testName Name of your test (i.e. 'multiplicationTest'). * @param {string} testType Type of test (i.e. 'assertEquals'). * @param {string} msg Informational message about what the test did (i.e. '7 != 6'). -### fail(testName, testType, msg) +**fail(testName, testType, msg)** + Log a failure directly without using a test method. * @param {string} testName Name of your test (i.e. 'multiplicationTest'). * @param {string} testType Type of test (i.e. 'assertEquals'). * @param {string} msg Informational message about what the test did (i.e. '7 != 6'). -## Process results -### testResults(silent = false) +### Process results +**testResults(silent = false)** + Display the results of the tests that were performed. * @param {boolean} silent If true, displays results in console only. If false, displays a summary in HTML. -## Misc -### initData() +### Misc +**initData()** + Reset test data back to default. ## License