mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Make DatasetStore the collision-free id authority
This commit is contained in:
@@ -53,7 +53,9 @@ describe('ChartBuilderModal', () => {
|
||||
now: T,
|
||||
});
|
||||
useDatasetStore.getState().add(ds);
|
||||
useChartBuilderStore.getState().init(ds.id);
|
||||
// `add` reassigns a collision-free id (it is the id authority), so read it back.
|
||||
const id = useDatasetStore.getState().datasets[0].id;
|
||||
useChartBuilderStore.getState().init(id);
|
||||
useChartBuilderStore.getState().setMark('bar');
|
||||
expect(useChartBuilderStore.getState().config.mark).toBe('bar');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user