From efddc3c09cacd6719a8206eeb3787a0c3aabb174 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Sat, 1 Aug 2015 21:47:13 -0500 Subject: [PATCH] Increase code coverage --- lib/handlebars/compiler/compiler.js | 1 + lib/handlebars/exception.js | 1 + lib/handlebars/utils.js | 8 ++++---- src/parser-suffix.js | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 457542162..2448443e6 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -66,6 +66,7 @@ Compiler.prototype = { }; if (knownHelpers) { for (let name in knownHelpers) { + /* istanbul ignore else */ if (name in knownHelpers) { options.knownHelpers[name] = knownHelpers[name]; } diff --git a/lib/handlebars/exception.js b/lib/handlebars/exception.js index 46ce18eae..52499c0ca 100644 --- a/lib/handlebars/exception.js +++ b/lib/handlebars/exception.js @@ -19,6 +19,7 @@ function Exception(message, node) { this[errorProps[idx]] = tmp[errorProps[idx]]; } + /* istanbul ignore else */ if (Error.captureStackTrace) { Error.captureStackTrace(this, Exception); } diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js index c7a5762be..81050f999 100644 --- a/lib/handlebars/utils.js +++ b/lib/handlebars/utils.js @@ -30,8 +30,8 @@ export let toString = Object.prototype.toString; // Sourced from lodash // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt -/*eslint-disable func-style, no-var */ -var isFunction = function(value) { +/*eslint-disable func-style */ +let isFunction = function(value) { return typeof value === 'function'; }; // fallback for older versions of Chrome and Safari @@ -41,8 +41,8 @@ if (isFunction(/x/)) { return typeof value === 'function' && toString.call(value) === '[object Function]'; }; } -export var isFunction; -/*eslint-enable func-style, no-var */ +export {isFunction}; +/*eslint-enable func-style */ /* istanbul ignore next */ export const isArray = Array.isArray || function(value) { diff --git a/src/parser-suffix.js b/src/parser-suffix.js index 6e4aa20d6..e0f37eb1f 100644 --- a/src/parser-suffix.js +++ b/src/parser-suffix.js @@ -1 +1,2 @@ -export default handlebars; +exports.__esModule = true; +module.exports['default'] = handlebars;