Skip to content
Open
Show file tree
Hide file tree
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
13 changes: 1 addition & 12 deletions src/backbone.radio.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import _ from 'underscore';
import Backbone from 'backbone';

var previousRadio = Backbone.Radio;

var Radio = Backbone.Radio = {};
var Radio = {};

Radio.VERSION = '<%= version %>';

// This allows you to run multiple instances of Radio on the same
// webapp. After loading the new version, call `noConflict()` to
// get a reference to it. At the same time the old version will be
// returned to Backbone.Radio.
Radio.noConflict = function() {
Backbone.Radio = previousRadio;
return this;
};

// Whether or not we're in DEBUG mode or not. DEBUG mode helps you
// get around the issues of lack of warnings when events are mis-typed.
Radio.DEBUG = false;
Expand Down
2 changes: 1 addition & 1 deletion test/setup/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = function(root) {
global.Backbone = require('backbone');
global.expect = global.chai.expect;
global.slice = Array.prototype.slice;
global.Radio = require('../../src/backbone.radio');
global.Backbone.Radio = global.Radio = require('../../src/backbone.radio').default;

beforeEach(function() {
this.sinon = global.sinon.sandbox.create();
Expand Down
4 changes: 0 additions & 4 deletions test/unit/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ describe('When Radio is attached to your application', function() {
expect(Backbone.Radio.VERSION).to.exist;
});

it('should have a noConflict method', function() {
expect(Backbone.Radio.noConflict).to.exist;
});

it('should have the channel method', function() {
expect(Backbone.Radio.channel).to.exist;
});
Expand Down
19 changes: 0 additions & 19 deletions test/unit/no-conflict.js

This file was deleted.