Skip to content

Commit

Permalink
Update flow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fayeed committed Nov 22, 2023
1 parent 5df8e5f commit 6e3f175
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/js/tests/social-dna-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ export default function socialDNATests(testContext: TestContext) {

const perspective = await ad4mClient.perspective.add("sdna-test");
expect(perspective.name).to.be.equal("sdna-test");

await perspective.add(new Link({
source: 'ad4m://self',
predicate: 'ad4m://has_zome',
target: Literal.from(sdna.join('\n')).toUrl(),
}))

let sDNAFacts = await ad4mClient!.perspective.queryLinks(perspective.uuid, new LinkQuery({source: "ad4m://self", predicate: "ad4m://has_zome"}));

await perspective.addSdna("Todo", Literal.from(sdna.join('\n')).toUrl(), "flow");


let sDNAFacts = await ad4mClient!.perspective.queryLinks(perspective.uuid, new LinkQuery({source: "ad4m://self", predicate: "ad4m://has_flow"}));
expect(sDNAFacts.length).to.be.equal(1);
let flows = await perspective.sdnaFlows()
expect(flows[0]).to.be.equal('TODO')

await perspective.add(new Link({source: 'ad4m://self', target: 'test-lang://1234'}))
let availableFlows = await perspective.availableFlows('test-lang://1234')
expect(availableFlows.length).to.be.equal(1)
Expand Down

0 comments on commit 6e3f175

Please sign in to comment.