Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

fix: stop pubsub after test #200

Merged
merged 2 commits into from
Apr 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default (common: TestSetup<PubSub, PubSubArgs>) => {

describe('nodes send state on connection', () => {
// Create pubsub nodes and connect them
before(async () => {
beforeEach(async () => {
componentsA = await createComponents()
componentsB = await createComponents()

Expand All @@ -43,7 +43,7 @@ export default (common: TestSetup<PubSub, PubSubArgs>) => {
})

// Make subscriptions prior to nodes connected
before(() => {
beforeEach(() => {
psA.subscribe('Za')
psB.subscribe('Zb')

Expand All @@ -53,8 +53,9 @@ export default (common: TestSetup<PubSub, PubSubArgs>) => {
expect(psB.getTopics()).to.deep.equal(['Zb'])
})

after(async () => {
afterEach(async () => {
sinon.restore()
await stop(psA, psB)
await common.teardown()
})

Expand Down Expand Up @@ -104,7 +105,7 @@ export default (common: TestSetup<PubSub, PubSubArgs>) => {

afterEach(async () => {
sinon.restore()

await stop(psA, psB)
await common.teardown()
})

Expand Down Expand Up @@ -174,9 +175,7 @@ export default (common: TestSetup<PubSub, PubSubArgs>) => {

afterEach(async () => {
sinon.restore()

await stop(psA, psB)

await common.teardown()
})

Expand Down Expand Up @@ -257,9 +256,7 @@ export default (common: TestSetup<PubSub, PubSubArgs>) => {

afterEach(async () => {
sinon.restore()

await stop(psA, psB)

await common.teardown()
})

Expand Down