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

Commit

Permalink
Tests: ES6 tests version should not use "var"
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Nov 25, 2016
1 parent 583886f commit 967c62c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/module_test-es6.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define(window.__env__['dependencies'], function (TornadoWebSocket) {
describe('TornadoWebSocket.Module', function () {

var MyModule = class extends TornadoWebSocket.Module {
class MyModule extends TornadoWebSocket.Module {
constructor(prefix) {
super(prefix)
}
Expand All @@ -15,16 +15,16 @@ define(window.__env__['dependencies'], function (TornadoWebSocket) {
})

it('should be inherited by a sub class', function () {
var myModule = new MyModule('my_module')
let myModule = new MyModule('my_module')

expect(myModule._name).toBe('module_my_module')
})
})

describe('on()', function () {
it('should call tws.on() with a prefix', function () {
var tws = new TornadoWebSocket('path')
var myModule = new MyModule('my_module_')
let tws = new TornadoWebSocket('path')
let myModule = new MyModule('my_module_')

spyOn(tws, 'on')

Expand All @@ -37,8 +37,8 @@ define(window.__env__['dependencies'], function (TornadoWebSocket) {

describe('emit()', function () {
it('should call tws.emit() with a prefix', function () {
var tws = new TornadoWebSocket('path')
var myModule = new MyModule('my_module_')
let tws = new TornadoWebSocket('path')
let myModule = new MyModule('my_module_')

spyOn(tws, 'emit')

Expand All @@ -49,4 +49,4 @@ define(window.__env__['dependencies'], function (TornadoWebSocket) {
})
})
})
})
})

0 comments on commit 967c62c

Please sign in to comment.