From c3f081ea8e5c8ba891428c78d0e80ae7f6db9456 Mon Sep 17 00:00:00 2001 From: nuochong Date: Tue, 17 Nov 2020 22:34:21 +0800 Subject: [PATCH] fix: update test cases (#238) --- .../@vuepress/shared-utils/__tests__/parseHeaders.spec.ts | 4 ++++ .../shared-utils/__tests__/removeNonCodeWrappedHTML.spec.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/@vuepress/shared-utils/__tests__/parseHeaders.spec.ts b/packages/@vuepress/shared-utils/__tests__/parseHeaders.spec.ts index 60ffc7afc0..aaa487a215 100644 --- a/packages/@vuepress/shared-utils/__tests__/parseHeaders.spec.ts +++ b/packages/@vuepress/shared-utils/__tests__/parseHeaders.spec.ts @@ -19,6 +19,10 @@ describe('parseHeaders', () => { '\\*vue\\*': '*vue*', '\\!vue\\!': '!vue!', + // #2688 + '[vue](vuejs.org) / [vue](vuejs.org)': 'vue / vue', + '[\\](vuejs.org)': '', + // #564 For multiple markdown tokens '`a` and `b`': 'a and b', '***bold and italic***': 'bold and italic', diff --git a/packages/@vuepress/shared-utils/__tests__/removeNonCodeWrappedHTML.spec.ts b/packages/@vuepress/shared-utils/__tests__/removeNonCodeWrappedHTML.spec.ts index cfa2594a92..cd80803d3e 100644 --- a/packages/@vuepress/shared-utils/__tests__/removeNonCodeWrappedHTML.spec.ts +++ b/packages/@vuepress/shared-utils/__tests__/removeNonCodeWrappedHTML.spec.ts @@ -44,7 +44,10 @@ test('removeNonCodeWrappedHTML', () => { '# H1 `` H2': '# H1 `` H2', '# H1 `` H2': '# H1 `` H2', '# H1 `` H2': '# H1 `` H2', - '# H1 `` H2': '# H1 `` H2' + '# H1 `` H2': '# H1 `` H2', + + // #2688 + '# \\': '# \\' } Object.keys(asserts).forEach(input => {