Skip to content

Commit

Permalink
STYLE: to standard
Browse files Browse the repository at this point in the history
  • Loading branch information
fega committed Mar 12, 2017
1 parent 2f2b06f commit 06eae39
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import assert from 'assert';
import wr from '../lib';
/* eslint-env node, mocha */
import wr from '../lib'
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
chai.use(chaiAsPromised)
var expect = chai.expect

describe('wordreference-api', function () {
this.timeout(5000);
describe('When you use a no valid word', function(){
it('Should throw an error');
})
this.timeout(5000)
describe('When you use a no valid word', function () {
it('Should throw an error')
})
describe('When you use a no valid language', function () {
it('Should throw an error');
});
it('Should throw an error')
})
describe('When you use a valid word', function () {
it('Should return a JSON with some properties', function (done) {
expect(wr('rainbow')).to.eventually.have.property("word")
expect(wr('rainbow')).to.eventually.have.property('word')
.and.notify(done)
});
});
})
})
describe('When you use a valid word and valid languages', function () {
it('Should return a JSON with some properties', function (done) {
expect(wr('rainbow')).to.eventually.have.property("word")
expect(wr('rainbow')).to.eventually.have.property('word')
.and.notify(done)
});
});
});
})
})
})
5 changes: 5 additions & 0 deletions test/manual-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const wr = require('./../dist')
const fs = require('fs')
wr('rainbow')
.then(res => fs.writeFile('index.html',JSON.stringify(res,undefined,2)))
.catch(res => console.log(res))

0 comments on commit 06eae39

Please sign in to comment.