aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/javascript/src/test_helpers/index.js
blob: 0cd4e260b31e8888aff94e9a9c2c9ecea7ce2a1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import * as ActionCable from "../../../../app/javascript/action_cable/index"

export const testURL = "ws://cable.example.com/"

export function defer(callback) {
  setTimeout(callback, 1)
}

const originalWebSocket = ActionCable.adapters.WebSocket
QUnit.testDone(() => ActionCable.adapters.WebSocket = originalWebSocket)