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

Commit

Permalink
updqte unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsamaya committed Jan 25, 2018
1 parent 7635c2b commit e2158d2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
44 changes: 21 additions & 23 deletions test/what3words/autosuggestML.spec.js
Expand Up @@ -51,29 +51,27 @@ describe('#autosuggestML ', () => {
});
});

// it('expects to fail with no lang', (done) => {
// what3words
// .autosuggestML({
// addr: 'index.home.r',
// })
// .then(
// (data) => {
// console.log(data);
// expect(data).to.exist;
// expect(data.code).to.exist;
// expect(data.code).to.equal(400);
// expect(data.message).to.exist;
// expect(data.message).to.equal('/autosuggest-ml: missing required parameter "lang"');
// done();
// },
// (rejected) => {
// console.log(rejected);
// done(rejected);
// })
// .catch((err) => {
// done(err);
// });
// });
it('without lang parameter', (done) => {
what3words
.autosuggestML({
addr: 'index.home.r',
})
.then(
(data) => {
// console.log(data);
expect(data).to.exist;
expect(data.suggestions).to.exist;
expect(data.suggestions).to.be.an('array');
done();
},
(rejected) => {
console.log(rejected);
done(rejected);
})
.catch((err) => {
done(err);
});
});

it('expects to fail with invalid addr', (done) => {
what3words
Expand Down
2 changes: 1 addition & 1 deletion test/what3words/standardblend.spec.js
Expand Up @@ -75,7 +75,7 @@ describe('#standardblend ', () => {
});
});

xit('expects to fail with invalid addr', (done) => {
it('expects to fail with invalid addr', (done) => {
what3words
.standardblend({
addr: 'abc',
Expand Down

0 comments on commit e2158d2

Please sign in to comment.