Mercurial > code > home > repos > streamed-graph
comparison src/layout/Layout.test.ts @ 114:4b33a479dc2f
fix layout test to match new layout return types. clean up UriPairMap
author | drewp@bigasterisk.com |
---|---|
date | Sat, 19 Mar 2022 16:12:49 -0700 |
parents | cbcd82d21356 |
children | dd3325cc023e |
comparison
equal
deleted
inserted
replaced
113:4822d5621463 | 114:4b33a479dc2f |
---|---|
80 it("puts the right type in the table", async () => { | 80 it("puts the right type in the table", async () => { |
81 const sec0 = lr.sections[0] as AlignedTable; | 81 const sec0 = lr.sections[0] as AlignedTable; |
82 expect(sec0.columnHeaders).toEqual([ | 82 expect(sec0.columnHeaders).toEqual([ |
83 { rdfType: EX("T1"), pred: EX("color") }, | 83 { rdfType: EX("T1"), pred: EX("color") }, |
84 { rdfType: EX("T1"), pred: EX("size") }, | 84 { rdfType: EX("T1"), pred: EX("size") }, |
85 // and doesn't include rdf:type as a column header here | |
85 ]); | 86 ]); |
87 expect(sec0.rowHeaders).toEqual([EX("a"), EX("b"), EX("c"), EX("e")]); | |
86 expect(sec0.rows).toEqual([ | 88 expect(sec0.rows).toEqual([ |
87 [EX("a"), EX("red"), null], | 89 [[EX("red")], []], |
88 [EX("b"), EX("blue"), null], | 90 [[EX("blue")], []], |
89 [EX("c"), null, null], | 91 [[], []], |
90 [EX("e"), null, EX("small")], | 92 [[], [EX("small")]], |
91 ]); | 93 ]); |
92 }); | 94 }); |
93 it("leaves the rest ungrouped", async () => { | 95 it("leaves the rest ungrouped", async () => { |
94 expect(lr.sections[1]).toEqual({ | 96 expect(lr.sections[1]).toEqual({ |
95 subjRows: [ | 97 subjRows: [ |
102 }, | 104 }, |
103 ], | 105 ], |
104 }); | 106 }); |
105 }); | 107 }); |
106 }); | 108 }); |
107 it("makes a table out of ungrouped triples with the same type", async () => {}); | 109 it.skip("makes a table out of ungrouped triples with the same type", async () => {}); |
108 }); | 110 }); |
109 | 111 |
110 // describe("equality", () => { | 112 // describe("equality", () => { |
111 // test("investigation of https://github.com/rdfjs/N3.js/issues/265", () => { | 113 // test("investigation of https://github.com/rdfjs/N3.js/issues/265", () => { |
112 // const x = namedNode("x"); | 114 // const x = namedNode("x"); |