From: likui <2218301630@qq.com> Date: Sat, 12 Oct 2019 23:49:23 +0000 (+0800) Subject: feat(compiler-core/runtime-core): show codeframe in runtime compile errors (#220) X-Git-Tag: v3.0.0-alpha.0~464 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46e64b257cbb81aa302d0d9a4c6434d21216ed2d;p=thirdparty%2Fvuejs%2Fcore.git feat(compiler-core/runtime-core): show codeframe in runtime compile errors (#220) --- diff --git a/packages/compiler-core/__tests__/__snapshots__/codeframe.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/codeframe.spec.ts.snap new file mode 100644 index 0000000000..89a4c26354 --- /dev/null +++ b/packages/compiler-core/__tests__/__snapshots__/codeframe.spec.ts.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`compiler: codeframe line in middle 1`] = ` +"2 | +3 | +6 | " +`; + +exports[`compiler: codeframe line near bottom 1`] = ` +"4 |
  • hi
  • +5 | +6 | + | ^^^^^^^^^ +7 | " +`; + +exports[`compiler: codeframe line near top 1`] = ` +"1 |
    +2 | + | ^^^^^^^^^ +3 |