Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
more es6`ixing
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jan 7, 2016
1 parent 96ad02a commit b4fede0
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/cli/commands/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const Command = require('ronin').Command
const httpAPI = require('../../http-api')
const debug = require('debug')
let log = debug('cli:daemon')
const log = debug('cli:daemon')
log.error = debug('cli:damon:error')

module.exports = Command.extend({
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/id.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Command = require('ronin').Command
const IPFS = require('../../ipfs-core')
const debug = require('debug')
let log = debug('cli:id')
const log = debug('cli:id')
log.error = debug('cli:id:error')

module.exports = Command.extend({
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const Command = require('ronin').Command
const IPFS = require('../../ipfs-core')
const debug = require('debug')
let log = debug('cli:version')
const log = debug('cli:version')
log.error = debug('cli:version:error')

module.exports = Command.extend({
Expand Down
2 changes: 1 addition & 1 deletion src/http-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const Hapi = require('hapi')
const IPFS = require('../ipfs-core')
const debug = require('debug')
let log = debug('api')
const log = debug('api')
log.error = debug('api:error')

exports = module.exports
Expand Down
7 changes: 4 additions & 3 deletions tests/test-api/test-version.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* globals describe, it */
'use strict'

var expect = require('chai').expect
const expect = require('chai').expect

process.env.IPFS_PATH = process.cwd() + '/tests/repo-example'
var api = require('../../src/http-api')
const api = require('../../src/http-api')

describe('api: version', function () {
it('get the version', function (done) {
it('get the version', done => {
api.start(err => {
expect(err).to.not.exist
api.server.inject({
Expand Down
12 changes: 7 additions & 5 deletions tests/test-cli-offline/test-version.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/* globals describe, it */

var expect = require('chai').expect
var nexpect = require('nexpect')
'use strict'

describe('cli-offline: version', function () {
it('get the version', function (done) {
const expect = require('chai').expect
const nexpect = require('nexpect')

describe('cli-offline: version', () => {
it('get the version', done => {
nexpect.spawn('node', [process.cwd() + '/src/cli/bin.js', 'version'])
.expect('0.4.0-dev')
.run(function (err, stdout, exitcode) {
.run((err, stdout, exitcode) => {
expect(err).to.not.exist
expect(exitcode).to.equal(0)
done()
Expand Down
11 changes: 6 additions & 5 deletions tests/test-cli/test-version.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* globals describe, it */
'use strict'

var expect = require('chai').expect
var nexpect = require('nexpect')
const expect = require('chai').expect
const nexpect = require('nexpect')

describe('cli: version', function () {
it('get the version', function (done) {
describe('cli: version', () => {
it('get the version', done => {
nexpect.spawn('node', [process.cwd() + '/src/cli/bin.js', 'version'])
.expect('0.4.0-dev')
.run(function (err, stdout, exitcode) {
.run((err, stdout, exitcode) => {
expect(err).to.not.exist
expect(exitcode).to.equal(0)
done()
Expand Down

0 comments on commit b4fede0

Please sign in to comment.