From 798a9cbe9bd1789ecbfd9684cb35f95cc1b8b03b Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 28 Sep 2019 14:15:10 -0400 Subject: [PATCH] test: improve coverage --- .../__snapshots__/parse.spec.ts.snap | 103 ++++++++++++++++++ .../compiler-core/__tests__/parse.spec.ts | 11 ++ .../transforms/transformExpressions.spec.ts | 18 +++ packages/compiler-core/src/codegen.ts | 2 +- packages/compiler-core/src/index.ts | 1 + 5 files changed, 134 insertions(+), 1 deletion(-) diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index 5b7edf2b33..4076be861a 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -7117,6 +7117,109 @@ Object { } `; +exports[`compiler: parse Errors X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END
1`] = ` +Object { + "children": Array [ + Object { + "children": Array [], + "codegenNode": undefined, + "isSelfClosing": true, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": "
", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "props": Array [ + Object { + "arg": Object { + "content": "se", + "isStatic": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "[sef", + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 4, + }, + "exp": undefined, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "v-foo:[sef", + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "modifiers": Array [], + "name": "foo", + "type": 7, + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + "source": "fsef]", + "start": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + }, + "name": "fsef]", + "type": 6, + "value": undefined, + }, + ], + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "hoists": Array [], + "imports": Array [], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": "
", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "statements": Array [], + "type": 0, +} +`; + exports[`compiler: parse Errors X_MISSING_END_TAG