File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ const Table = require ( '../..' ) ;
2+
3+ /**
4+ * This test doesn't actually fail it never completes. I could not find a method
5+ * to get the infinite loop to timeout within the test. Not sure how GHA will
6+ * handle this.
7+ */
8+ test ( 'it should not loop infinitely with invalid table data' , async ( ) => {
9+ const table = new Table ( ) ;
10+ table . push (
11+ [
12+ { content : 'A' , colSpan : 2 } ,
13+ { content : 'B' , rowSpan : 3 } ,
14+ ] ,
15+ [ ] ,
16+ [ { content : 'C' , colSpan : 3 } ]
17+ ) ;
18+ expect ( ( ) => table . toString ( ) ) . not . toThrow ( ) ;
19+ } ) ;
20+
21+ test ( 'it should not error on invalid table data' , ( ) => {
22+ const table = new Table ( ) ;
23+ table . push (
24+ [
25+ { content : 'A' , colSpan : 2 } ,
26+ { content : 'B' , rowSpan : 3 } ,
27+ ] ,
28+ [ { content : 'C' , colSpan : 3 } ]
29+ ) ;
30+ expect ( ( ) => table . toString ( ) ) . not . toThrow ( ) ;
31+ } ) ;
You can’t perform that action at this time.
0 commit comments