-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from nfdi4plants/docu
Add js unioncase helpers and tests
- Loading branch information
Showing
5 changed files
with
212 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { equal, deepEqual, notEqual } from 'assert'; | ||
import { CompositeCell } from "./ARCtrl/ISA/ISA/ArcTypes/CompositeCell.js" | ||
import { OntologyAnnotation } from './ARCtrl/ISA/ISA/JsonTypes/OntologyAnnotation.js'; | ||
import { assertEqual } from './ARCtrl/fable_modules/fable-library.4.5.0/Util.js'; | ||
|
||
|
||
|
||
|
||
describe('CompositeCell', function () { | ||
|
||
it('Helper Members', function () { | ||
let oa = OntologyAnnotation.fromString("My OA Name", "NCIT", "http://purl.obolibrary.org/obo/NCIT_C12345") | ||
let t1 = CompositeCell.term(oa) | ||
let t2 = new CompositeCell(0, [oa]) | ||
assertEqual(t1, t2); | ||
|
||
let ft = "My FreeTextValue" | ||
let ft1 = CompositeCell.freeText(ft) | ||
let ft2 = new CompositeCell(1, [ft]) | ||
assertEqual(ft1, ft2); | ||
|
||
let v = 5 | ||
let u1 = CompositeCell.unitized(5, oa) | ||
let u2 = new CompositeCell(2, [v, oa]) | ||
assertEqual(u1, u2); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters