Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): Remove deleteNode with ID arg #29205

Merged
merged 10 commits into from
Feb 10, 2021
Prev Previous commit
Next Next commit
update existing tests
  • Loading branch information
LekoArts committed Jan 27, 2021
commit eb1722107930120052928dfd70c73c3fe18f978f
35 changes: 10 additions & 25 deletions packages/gatsby/src/db/__tests__/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,9 @@ describe(`nodes db tests`, () => {
)
)
store.dispatch(
actions.deleteNode(
{
node: getNode(`hi`),
},
{
name: `tests`,
}
)
actions.deleteNode(getNode(`hi`), {
name: `tests`,
})
)
expect(getNodes()).toHaveLength(1)
})
Expand Down Expand Up @@ -272,12 +267,9 @@ describe(`nodes db tests`, () => {
)
)
store.dispatch(
actions.deleteNode(
{ node: getNode(`hi`) },
{
name: `tests`,
}
)
actions.deleteNode(getNode(`hi`), {
name: `tests`,
})
)
expect(getNodes()).toHaveLength(0)
})
Expand Down Expand Up @@ -309,11 +301,7 @@ describe(`nodes db tests`, () => {
}
)
)
store.dispatch(
actions.deleteNode({
node: getNode(`hi`),
})
)
store.dispatch(actions.deleteNode(getNode(`hi`)))
expect(getNode(`hi`)).toBeUndefined()
})

Expand Down Expand Up @@ -370,12 +358,9 @@ describe(`nodes db tests`, () => {
)
)
store.dispatch(
actions.deleteNode(
{ node: getNode(`hi`) },
{
name: `tests`,
}
)
actions.deleteNode(getNode(`hi`), {
name: `tests`,
})
)
}).toThrow(/deleted/)
})
Expand Down