Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-lindgren committed Oct 16, 2024
1 parent 5be7b06 commit b0d2b9a
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,42 +126,38 @@ describe('PluginLoadedMessage', () => {
expect(
isPluginLoadedMessage({
...stub,
subscribeState: undefined,
}),
).toEqual(true)
})
it('is a boolean', () => {
expect(
isPluginLoadedMessage({
...stub,
subscribeState: true,
enablePortalModal: true,
}),
).toEqual(true)
expect(
isPluginLoadedMessage({
...stub,
subscribeState: false,
enablePortalModal: false,
}),
).toEqual(true)
const { subscribeState: _subscribeState, ...subWithoutSubscribeState } =
stub
expect(isPluginLoadedMessage(subWithoutSubscribeState)).toEqual(true)
expect(
isPluginLoadedMessage({
...stub,
subscribeState: 'false',
enablePortalModal: 'false',
}),
).toEqual(false)
expect(
isPluginLoadedMessage({
...stub,
subscribeState: 123,
enablePortalModal: 123,
}),
).toEqual(false)
expect(
isPluginLoadedMessage({
...stub,
subscribeState: null,
enablePortalModal: null,
}),
).toEqual(false)
})
Expand Down

0 comments on commit b0d2b9a

Please sign in to comment.