Skip to content

Commit d857bac

Browse files
authored
Merge pull request #16 from Cheukting/dev
Add test for join method
2 parents e4d9224 + 9ce4d02 commit d857bac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/woql.spec.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,21 @@ describe('woql queries', function () {
347347

348348
})
349349

350+
it('check the join method',function(){
351+
352+
const woqlObject=WOQL.join(["v:A_obj", "v:B_obj"], ", ", "v:output");
353+
const jsonObj={
354+
'join': [
355+
[ 'v:A_obj', 'v:B_obj' ],
356+
{ '@value': ', ', '@type': 'xsd:string' },
357+
'v:output'
358+
]
359+
};
360+
361+
expect(woqlObject.json()).to.eql(jsonObj);
362+
363+
})
364+
350365
it('check the split method',function(){
351366

352367
const woqlObject=WOQL.split("A, B, C", ", ", "v:list_obj");

0 commit comments

Comments
 (0)