We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef3e979 commit b4ec83fCopy full SHA for b4ec83f
cypress/e2e/api/SessionApi.spec.js
@@ -296,12 +296,15 @@ describe('The session Api', function() {
296
it('signals closing connection', function() {
297
cy.then(() => {
298
return new Promise((resolve, reject) => {
299
+ // Create a promise that resolves when close completes
300
connection.close()
- connection.push({ steps: [messages.update], version, awareness: '' })
301
- .then(
302
- () => reject(new Error('Push should have thrown ConnectionClosed()')),
303
- resolve,
304
- )
+ .then(() => {
+ connection.push({ steps: [messages.update], version, awareness: '' })
+ .then(
+ () => reject(new Error('Push should have thrown ConnectionClosed()')),
305
+ resolve,
306
+ )
307
+ })
308
})
309
310
0 commit comments