test: improve coverage

This commit is contained in:
Evan You
2019-09-28 14:15:10 -04:00
parent 1c410205de
commit 798a9cbe9b
5 changed files with 134 additions and 1 deletions

View File

@@ -374,8 +374,8 @@ function genNode(node: CodegenNode, context: CodegenContext) {
case NodeTypes.JS_SLOT_FUNCTION:
genSlotFunction(node, context)
break
/* istanbul ignore next */
default:
/* istanbul ignore if */
if (__DEV__) {
assert(false, `unhandled codegen node type: ${(node as any).type}`)
// make sure we exhaust all possible types

View File

@@ -22,6 +22,7 @@ export function baseCompile(
template: string | RootNode,
options: CompilerOptions = {}
): CodegenResult {
/* istanbul ignore if */
if (__BROWSER__) {
const onError = options.onError || defaultOnError
if (options.prefixIdentifiers === true) {