Skip to content

Commit

Permalink
temp workaround in tests for CSBiology/DynamicObj#25
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Sep 4, 2024
1 parent 9deffb7 commit 4b4a2fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/ROCrate/Common.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ module Expect =
Expect.equal roc.AdditionalType (Some expectedAdditionalType) "object did not contain correct additionalType"

let inline ROCrateObjectHasProperty (expectedPropertyName:string) (expectedPropertyValue:'P) (roc:#ROCrateObject) =
#if !FABLE_COMPILER
Expect.isTrue (roc.Properties.ContainsKey expectedPropertyName) $"object did not contain the property 'expectedPropertyName'"
Expect.equal (roc.TryGetTypedValue<'P>(expectedPropertyName)) (Some expectedPropertyValue) "property value of 'expectedPropertyName' was not correct"

#endif
#if FABLE_COMPILER
Expect.equal (roc.TryGetValue(expectedPropertyName)) (Some expectedPropertyValue) "property value of 'expectedPropertyName' was not correct"
#endif
let inline ROCrateObjectHasExpectedInterfaceMembers (expectedType:string) (expectedId:string) (expectedAdditionalType:string option) (roc:#ROCrateObject) =
let interfacerino = roc :> IROCrateObject
Expect.equal interfacerino.SchemaType expectedType "object did not contain correct @type via interface access"
Expand Down

0 comments on commit 4b4a2fc

Please sign in to comment.