From 84cfd33c808160fd2b6d7fd918b73df8c8503ace Mon Sep 17 00:00:00 2001 From: "Anosh D. Ullenius" Date: Fri, 8 Jul 2022 16:41:25 +0200 Subject: [PATCH 1/3] Valid HTML in example --- example/adder-test.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 + + + + + + + From ec507ebe913e3d647b487fa4b9481735377f2088 Mon Sep 17 00:00:00 2001 From: "Anosh D. Ullenius" Date: Fri, 8 Jul 2022 17:07:38 +0200 Subject: [PATCH 2/3] Strict mode. Use string literals --- tinytest.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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}"`); } }, From 141d87d679ba82fd5a72ea2569631fe9ee091ce2 Mon Sep 17 00:00:00 2001 From: "Anosh D. Ullenius" Date: Fri, 8 Jul 2022 17:15:22 +0200 Subject: [PATCH 3/3] Minor. Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.