Skip to content

Commit

Permalink
fix: revert mocha tests
Browse files Browse the repository at this point in the history
  • Loading branch information
citizensas committed Jun 16, 2021
1 parent 1f4e904 commit 2e82d63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/Api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
import * as should from 'should'

import {Api} from '../'
import {NodeApi} from '../src/node'

describe('Create new instance for API', function () {
it('should have methods', function () {
const api = new Api({url: 'http://localhost'})
const api = new NodeApi({url: 'http://localhost'})
should(api.copy).be.a.Function().and.has.lengthOf(5)
should(api.count).be.a.Function().and.has.lengthOf(2)
should(api.create).be.a.Function().and.has.lengthOf(3)
Expand All @@ -41,17 +41,17 @@ describe('Create new instance for API', function () {
})

it('should set correct API path based on passed configuration (version is passed)', function () {
const api = new Api({url: 'http://localhost', version: '2.0'})
const api = new NodeApi({url: 'http://localhost', version: '2.0'})
should(api._httpOptions.path).equal('/attask/api/v2.0')
})

it('should set correct API path based on passed configuration (version is not passed)', function () {
const api = new Api({url: 'http://localhost'})
const api = new NodeApi({url: 'http://localhost'})
should(api._httpOptions.path).equal('/attask/api-internal')
})

it('should set correct API path based on passed configuration (version="asp")', function () {
const api = new Api({url: 'http://localhost', version: 'asp'})
const api = new NodeApi({url: 'http://localhost', version: 'asp'})
should(api._httpOptions.path).equal('/attask/api-asp')
})
})

0 comments on commit 2e82d63

Please sign in to comment.