Skip to content

fix: <br> and <p> linebreak not correctly rendered #184

fix: <br> and <p> linebreak not correctly rendered

fix: <br> and <p> linebreak not correctly rendered #184

GitHub Actions / Chronocat Unit Tests failed Sep 21, 2024 in 1s

3 passed, 2 failed and 0 skipped

Tests failed

❌ coverage/jest-junit.xml

5 tests were completed in 16s with 3 passed, 2 failed and 0 skipped.

Test suite Passed Failed Skipped Time
packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts 3✅ 2❌ 12s

❌ packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts

✅ Red 编码器应当正确编码 纯文本消息
✅ Red 编码器应当正确编码 链接
✅ Red 编码器应当正确编码 br 换行
❌ Red 编码器应当正确编码 p 换行
	Error: expect(received).toMatchSnapshot()
❌ Red 编码器应当正确编码 br/p 混搭换行
	Error: expect(received).toMatchSnapshot()

Annotations

Check failure on line 100 in packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts

See this annotation in the file changed.

@github-actions github-actions / Chronocat Unit Tests

packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts ► Red 编码器应当正确编码 p 换行

Failed test found in:
  coverage/jest-junit.xml
Error:
  Error: expect(received).toMatchSnapshot()
Raw output
Error: expect(received).toMatchSnapshot()

Snapshot name: `Red 编码器应当正确编码 p 换行 1`

- Snapshot  - 3
+ Received  + 9

@@ -12,22 +12,28 @@
          "textElement": {
            "atNtUid": "",
            "atTinyId": "",
            "atType": 0,
            "atUid": "",
-           "content": "aaa
- bbb
+           "content": "

+ aaa
+ bbb
  ccc
  ddd
-
  eee
+

  fff
+
+
  ggg

+
  hhh
+
+
  iii",
          },
        },
      ],
    ],
    at Object.<anonymous> (/home/runner/work/chronocat/chronocat/packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts:100:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 127 in packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts

See this annotation in the file changed.

@github-actions github-actions / Chronocat Unit Tests

packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts ► Red 编码器应当正确编码 br/p 混搭换行

Failed test found in:
  coverage/jest-junit.xml
Error:
  Error: expect(received).toMatchSnapshot()
Raw output
Error: expect(received).toMatchSnapshot()

Snapshot name: `Red 编码器应当正确编码 br/p 混搭换行 1`

- Snapshot  -  4
+ Received  + 10

@@ -12,27 +12,33 @@
          "textElement": {
            "atNtUid": "",
            "atTinyId": "",
            "atType": 0,
            "atUid": "",
-           "content": "aaa
+           "content": "
+
+ aaa
  bbb
  uuu

  ccc
  ddd
-
  eee
-
  vvv
  www
+
+
  fff
+
+
  ggg
+

  hhh
- iii
+

+ iii
  xxx
  yyy


  zzz",
    at Object.<anonymous> (/home/runner/work/chronocat/chronocat/packages/engine-chronocat-api/tests/messager/fixtures/text/index.test.ts:127:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)