diff --git a/README.md b/README.md index 4180da7..e46157d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Tiniest JavaScript unit testing library ======================================= -This is an in-browser JavaScript library I've been using for years. It's so small and simple that it never occured to me to open source it until I saw all the overly complicated alternatives that are out there. +This is an in-browser JavaScript library I've been using for years. It's so small and simple that it never occurred to me to open source it until I saw all the overly complicated alternatives that are out there. If you're looking for a JavaScript library full of features or install guides that say things like `grunt`, `npm` or `bower`, you've come to the wrong place. Sorry, this probably isn't for you. Move along now. diff --git a/example/adder-test.html b/example/adder-test.html index 040f155..ef77ac0 100644 --- a/example/adder-test.html +++ b/example/adder-test.html @@ -1,16 +1,29 @@ + + + + + +jstinytest — Adder example + + + + + + + diff --git a/tinytest.js b/tinytest.js index 183d0eb..1d52fac 100644 --- a/tinytest.js +++ b/tinytest.js @@ -37,6 +37,7 @@ * -Joe Walnes * MIT License. See https://github.com/joewalnes/jstinytest/ */ +"use strict"; const TinyTest = { run: function(tests) { @@ -71,13 +72,13 @@ const TinyTest = { assertEquals: function(expected, actual) { if (expected != actual) { - throw new Error('assertEquals() "' + expected + '" != "' + actual + '"'); + throw new Error(`assertEquals() "${expected}" != "${actual}"`); } }, assertStrictEquals: function(expected, actual) { if (expected !== actual) { - throw new Error('assertStrictEquals() "' + expected + '" !== "' + actual + '"'); + throw new Error(`assertStrictEquals() "${expected}" !== "${actual}"`); } },