From 4e2404cb9907652c8213260c04e7008523c49a3d Mon Sep 17 00:00:00 2001 From: akamefi202 Date: Wed, 6 Dec 2023 00:13:56 +0800 Subject: [PATCH] add test cases Signed-off-by: akamefi202 --- __tests__/ExpensiMark-HTML-test.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/__tests__/ExpensiMark-HTML-test.js b/__tests__/ExpensiMark-HTML-test.js index 87f41dc5..3c0f3dec 100644 --- a/__tests__/ExpensiMark-HTML-test.js +++ b/__tests__/ExpensiMark-HTML-test.js @@ -1700,9 +1700,18 @@ describe('when should keep whitespace flag is enabled', () => { }); test('Test code fence within inline code', () => { - let testString = '`(```test```)`'; - expect(parser.replace(testString)).toBe('`(
test
)`'); + let testString = 'Hello world `(```test```)` Hello world'; + expect(parser.replace(testString)).toBe('Hello world `(
test
)` Hello world'); - testString = '`test`space```block```'; - expect(parser.replace(testString)).toBe('testspace
block
'); + testString = 'Hello world `(```test\ntest```)` Hello world'; + expect(parser.replace(testString)).toBe('Hello world `(
test
test
)` Hello world'); + + testString = 'Hello world ```(`test`)``` Hello world'; + expect(parser.replace(testString)).toBe('Hello world
(`test`)
Hello world'); + + testString = 'Hello world `test`space```block``` Hello world'; + expect(parser.replace(testString)).toBe('Hello world testspace
block
Hello world'); + + testString = 'Hello world ```block```space`test` Hello world'; + expect(parser.replace(testString)).toBe('Hello world
block
spacetest Hello world'); });