diff --git a/demos/lit-html/src/state/store.ts b/demos/lit-html/src/state/store.ts index e8f8fef6..db6220b1 100644 --- a/demos/lit-html/src/state/store.ts +++ b/demos/lit-html/src/state/store.ts @@ -1,5 +1,5 @@ import type { ModelStore, StoreDispatch, StoreState } from '@captaincodeman/rdx' -import { createStore, devtools, persist } from '@captaincodeman/rdx' +import { createStore, persist } from '@captaincodeman/rdx' import { config } from './config.js' export type State = StoreState @@ -44,11 +44,5 @@ export const store = (() => { }, }) - return () => { - if (window.Shaperone?.DEBUG === true) { - return devtools(store) - } - - return store - } + return () => store })() diff --git a/packages/core-tests/models/forms/effects/replaceObjects.test.ts b/packages/core-tests/models/forms/effects/replaceObjects.test.ts index e5a04c44..7e03b2e1 100644 --- a/packages/core-tests/models/forms/effects/replaceObjects.test.ts +++ b/packages/core-tests/models/forms/effects/replaceObjects.test.ts @@ -16,7 +16,7 @@ describe('models/forms/effects/replaceObjects', () => { it('dispatches setPropertyObjects with pointers from resource graph', () => { // given - const { dataset } = store.getState().resources.graph + const { dataset } = store.getState().resources.graph! const property = propertyShape() const focusNode = $rdf.clownface().blankNode() const terms = [ diff --git a/packages/core-tests/models/forms/reducers/editors.test.ts b/packages/core-tests/models/forms/reducers/editors.test.ts index 95f63ac2..bda5639c 100644 --- a/packages/core-tests/models/forms/reducers/editors.test.ts +++ b/packages/core-tests/models/forms/reducers/editors.test.ts @@ -149,13 +149,6 @@ describe('core/models/forms/reducers/editors', () => { }), }, }) - testState(state, { - focusNodes: { - ...testFocusNodeState(focusNode, { - properties: [property], - }), - }, - }) const editors = testEditorsState({ matchSingleEditors: () => [{ term: dash.TextFieldEditor, diff --git a/packages/core-tests/models/resources/effects/forms/addFormField.test.ts b/packages/core-tests/models/resources/effects/forms/addFormField.test.ts index 10bf26e3..068ae02f 100644 --- a/packages/core-tests/models/resources/effects/forms/addFormField.test.ts +++ b/packages/core-tests/models/resources/effects/forms/addFormField.test.ts @@ -19,8 +19,8 @@ describe('models/resources/effects/forms/addFormField', () => { beforeEach(() => { store = testStore() - formState = store.getState().form; - ({ graph } = store.getState().resources) + formState = store.getState().form + graph = store.getState().resources.graph! }) it('adds sh:defaultValue to graph', () => { diff --git a/packages/core-tests/models/resources/effects/forms/clearValue.test.ts b/packages/core-tests/models/resources/effects/forms/clearValue.test.ts index 04d6fcdc..17cef7c1 100644 --- a/packages/core-tests/models/resources/effects/forms/clearValue.test.ts +++ b/packages/core-tests/models/resources/effects/forms/clearValue.test.ts @@ -13,8 +13,8 @@ describe('models/resources/effects/forms/clearValue', () => { let graph: AnyPointer beforeEach(() => { - store = testStore(); - ({ graph } = store.getState().resources) + store = testStore() + graph = store.getState().resources.graph! }) it('removes value from graph', () => { diff --git a/packages/core-tests/models/resources/effects/forms/createFocusNodeState.test.ts b/packages/core-tests/models/resources/effects/forms/createFocusNodeState.test.ts index 0105daa0..5625b483 100644 --- a/packages/core-tests/models/resources/effects/forms/createFocusNodeState.test.ts +++ b/packages/core-tests/models/resources/effects/forms/createFocusNodeState.test.ts @@ -21,8 +21,8 @@ describe('models/resources/effects/forms/createFocusNodeState', () => { beforeEach(() => { store = testStore() - formState = store.getState().form; - ({ graph } = store.getState().resources) + formState = store.getState().form + graph = store.getState().resources.graph! }) it('ensures defaultValue added to graph and object without default', () => { diff --git a/packages/core-tests/models/resources/effects/forms/removeObject.test.ts b/packages/core-tests/models/resources/effects/forms/removeObject.test.ts index 63b8d695..d8cdb33f 100644 --- a/packages/core-tests/models/resources/effects/forms/removeObject.test.ts +++ b/packages/core-tests/models/resources/effects/forms/removeObject.test.ts @@ -14,8 +14,8 @@ describe('models/resources/effects/forms/removeObject', () => { let graph: AnyPointer beforeEach(() => { - store = testStore(); - ({ graph } = store.getState().resources) + store = testStore() + graph = store.getState().resources.graph! }) it("removes object's value from dataset", () => {