Mercurial > code > home > repos > streamed-graph
comparison src/layout/ViewConfig.test.ts @ 106:2468f2227d22
make src/layout/ and src/render/ separation
author | drewp@bigasterisk.com |
---|---|
date | Sun, 13 Mar 2022 22:00:30 -0700 |
parents | src/ViewConfig.test.ts@ab7dca42afbd |
children | 2e8fa3fec0c8 |
comparison
equal
deleted
inserted
replaced
105:4bb8c7775c83 | 106:2468f2227d22 |
---|---|
1 import { Util } from "n3"; | |
2 import { ViewConfig } from "./ViewConfig"; | |
3 | |
4 describe("ViewModel", () => { | |
5 it("gets a table description", async () => { | |
6 const vc = new ViewConfig(); | |
7 | |
8 await vc.readFromGraph(` | |
9 @prefix ex: <http://example.com/> . | |
10 @prefix demo: <http://example.com/demo/> . | |
11 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
12 @prefix : <http://bigasterisk.com/netRoutes/ns#> . | |
13 | |
14 <> a ex:View ; rdfs:label "repos" . | |
15 <> ex:table demo:table1 . | |
16 demo:table1 | |
17 ex:primaryType :FilteredNic; | |
18 ex:joinType :Traffic . | |
19 `); | |
20 const NET = Util.prefix("http://bigasterisk.com/netRoutes/ns#"); | |
21 | |
22 expect(vc.tables[0].primary).toEqual(NET("FilteredNic")); | |
23 expect(vc.tables[0].joins).toEqual([NET("Traffic")]); | |
24 }); | |
25 }); |