Skip to content

Commit

Permalink
Fix failing JSON tests for Table.
Browse files Browse the repository at this point in the history
GeoJSON and Visualisation to go.
  • Loading branch information
jdunkerley committed Dec 19, 2022
1 parent 2e6d54b commit 0623886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Table_Tests/src/IO/Json_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec = Test.group 'JSON conversion' <|

Test.specify 'should convert tables to a format compatible with Table.from_json' <|
clothes_json = clothes.to_json
Table.from_json clothes_json ['Id', 'Name', 'Quantity', 'Rating', 'Price'] . should_equal clothes
Table.from_json (Json.parse clothes_json) ['Id', 'Name', 'Quantity', 'Rating', 'Price'] . should_equal clothes

Test.specify 'should write JSON tables to disk' <|
out = enso_project.data / 'out.json'
Expand All @@ -26,7 +26,7 @@ spec = Test.group 'JSON conversion' <|
r_1 = JS_Object.from_pairs [['foo', 20], ['bar', 'baz'], ['baz', False]]
r_2 = JS_Object.from_pairs [['bar', 'xyz'], ['baz', True]]
r_3 = JS_Object.from_pairs [['baz', False], ['foo', 13]]
t = Table.from_json [r_1, r_2, r_3].to_json ['foo', 'bar', 'baz']
t = Table.from_json [r_1, r_2, r_3] ['foo', 'bar', 'baz']
t.columns.map .name . should_equal ['foo', 'bar', 'baz']
t.at 'foo' . to_vector . should_equal [20, Nothing, 13]
t.at 'bar' . to_vector . should_equal ['baz', 'xyz', Nothing]
Expand Down

0 comments on commit 0623886

Please sign in to comment.