diff options
author | rmacklin <1863540+rmacklin@users.noreply.github.com> | 2018-11-26 14:16:02 -0800 |
---|---|---|
committer | Javan Makhmali <javan@javan.us> | 2018-11-26 17:16:02 -0500 |
commit | 85b080365313437f646070ca214fef433c06db6a (patch) | |
tree | a2df565070129cef9f5064b565229a1a9ad96be5 /actioncable/test/javascript/src/unit/action_cable_test.coffee | |
parent | 38b676181b7cce5191b1877ad6781c490d38436d (diff) | |
download | rails-85b080365313437f646070ca214fef433c06db6a.tar.gz rails-85b080365313437f646070ca214fef433c06db6a.tar.bz2 rails-85b080365313437f646070ca214fef433c06db6a.zip |
Convert ActionCable tests from CoffeeScript to ES2015 and replace Blade with Karma and Rollup (#34440)
* Rename .coffee files in ActionCable test suite in prep for decaffeination
* Decaffeinate ActionCable tests
* Replace Blade with Karma and Rollup to run ActionCable JS tests
- Add karma and qunit devDependencies
- Add test script to ActionCable package
- Use rollup to bundle ActionCable tests
- Use karma as the ActionCable JS test runner
* Replace vendored mock-socket with package devDependency in ActionCable
* Move ActionCable yarn install to TravisCI before_install config
* Clean up decaffeinated ActionCable tests to use consistent formatting
Diffstat (limited to 'actioncable/test/javascript/src/unit/action_cable_test.coffee')
-rw-r--r-- | actioncable/test/javascript/src/unit/action_cable_test.coffee | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/actioncable/test/javascript/src/unit/action_cable_test.coffee b/actioncable/test/javascript/src/unit/action_cable_test.coffee deleted file mode 100644 index 3944f3a7f6..0000000000 --- a/actioncable/test/javascript/src/unit/action_cable_test.coffee +++ /dev/null @@ -1,41 +0,0 @@ -{module, test} = QUnit -{testURL} = ActionCable.TestHelpers - -module "ActionCable", -> - module "Adapters", -> - module "WebSocket", -> - test "default is window.WebSocket", (assert) -> - assert.equal ActionCable.WebSocket, window.WebSocket - - test "configurable", (assert) -> - ActionCable.WebSocket = "" - assert.equal ActionCable.WebSocket, "" - - module "logger", -> - test "default is window.console", (assert) -> - assert.equal ActionCable.logger, window.console - - test "configurable", (assert) -> - ActionCable.logger = "" - assert.equal ActionCable.logger, "" - - module "#createConsumer", -> - test "uses specified URL", (assert) -> - consumer = ActionCable.createConsumer(testURL) - assert.equal consumer.url, testURL - - test "uses default URL", (assert) -> - pattern = ///#{ActionCable.INTERNAL.default_mount_path}$/// - consumer = ActionCable.createConsumer() - assert.ok pattern.test(consumer.url), "Expected #{consumer.url} to match #{pattern}" - - test "uses URL from meta tag", (assert) -> - element = document.createElement("meta") - element.setAttribute("name", "action-cable-url") - element.setAttribute("content", testURL) - - document.head.appendChild(element) - consumer = ActionCable.createConsumer() - document.head.removeChild(element) - - assert.equal consumer.url, testURL |