Skip to content

Commit

Permalink
refactor: migrate index to ES2015 (#3006)
Browse files Browse the repository at this point in the history
  • Loading branch information
devoto13 authored and johnjbarton committed May 17, 2018
1 parent 582f96f commit adaefd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// index module
'use strict'

var constants = require('./constants')
var Server = require('./server')
var runner = require('./runner')
var stopper = require('./stopper')
var launcher = require('./launcher')
var cfg = require('./config')
const constants = require('./constants')
const Server = require('./server')
const runner = require('./runner')
const stopper = require('./stopper')
const launcher = require('./launcher')
const cfg = require('./config')

// TODO: remove in 1.0
var oldServer = {
const oldServer = {
start: function (cliOptions, done) {
console.error('WARN `start` method is deprecated since 0.13. It will be removed in 0.14. Please use \n' +
' server = new Server(config, [done])\n' +
' server.start()\n' +
'instead.')
var server = new Server(cliOptions, done)
const server = new Server(cliOptions, done)
server.start()
}
}
Expand Down
6 changes: 4 additions & 2 deletions test/unit/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var cfg = require('../../lib/config')
'use strict'

const cfg = require('../../lib/config')

describe('index', () => {
var index = require('../../lib/index')
const index = require('../../lib/index')

it('should expose the `config` object', () => {
expect(index.config.parseConfig).to.be.eq(cfg.parseConfig)
Expand Down

0 comments on commit adaefd5

Please sign in to comment.