From 8b0800b02d9880eb7fe4162ecc7d8f986a45ad78 Mon Sep 17 00:00:00 2001 From: Nicolai Kamenzky Date: Sat, 5 Jul 2014 23:35:52 +0200 Subject: [PATCH] Allow for failures If the template was not properly loaded `document.getElementById('tpl')` would return `null`. Then `expect(...).toBeDefined()` would still report a success. I changed it to `expect(...).toBeTruthy()` so it actually reports a failure if something goes wrong. --- e2e-test/spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-test/spec.js b/e2e-test/spec.js index 1460a4a..6abe00a 100644 --- a/e2e-test/spec.js +++ b/e2e-test/spec.js @@ -1,6 +1,6 @@ describe('template', function() { it('should expose the templates to __html__', function() { document.body.innerHTML = __html__['template.html']; - expect(document.getElementById('tpl')).toBeDefined(); + expect(document.getElementById('tpl')).toBeTruthy(); }) })