Steven Fukase 4 лет назад
Родитель
Сommit
e151e5ca67
1 измененных файлов с 30 добавлено и 5 удалено
  1. 30 5
      packages/slack/src/utils/reshape-contents-body.test.ts

+ 30 - 5
packages/slack/src/utils/reshape-contents-body.test.ts

@@ -2,11 +2,36 @@ import { reshapeContentsBody } from './reshape-contents-body';
 
 describe('reshapeContentsBody', () => {
 
-  test('Create formatted text for GROWI', () => {
-    const text = 'Random text';
-    expect(() => {
-      reshapeContentsBody(text);
-    }).to;
+  describe('Create formatted text for GROWI', () => {
+
+    test('1. Input does not contain name of the sender', () => {
+      const input = '# Title  \n## Section  \nI tested this code at 12:00 AM  **bold** text';
+      const output = '# Title  ## Section  I tested this code at 12:00 AM  **bold** text';
+
+      expect(reshapeContentsBody(input)).toBe(output);
+    });
+
+    // test('2. Input does not contain name of the sender', () => {
+    //   const input = '';
+    //   const output = input;
+
+    //   expect(reshapeContentsBody(input)).toBe(output);
+    // });
+
+    // test('3. Input does not contain name of the sender', () => {
+    //   const input = '';
+    //   const output = input;
+
+    //   expect(reshapeContentsBody(input)).toBe(output);
+    // });
+
+    // test('4. Input does not contain name of the sender', () => {
+    //   const input = '';
+    //   const output = input;
+
+    //   expect(reshapeContentsBody(input)).toBe(output);
+    // });
+
   });
 
 });