Skip to content

Commit 9177d9c

Browse files
committed
test: read Api from the right bundle file
1 parent b16ed61 commit 9177d9c

18 files changed

Lines changed: 22 additions & 22 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"AtTask",
7979
"Workfront",
8080
"TypeScript",
81-
"Webpack"
81+
"rollup"
8282
],
8383
"author": "Workfront",
8484
"contributors": [

test/Api.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
*/
1616
import * as should from 'should'
1717

18-
import {Api} from '../src/node'
18+
import {NodeApi} from '../src/node'
1919

2020
describe('Create new instance for API', function() {
2121
it('should have methods', function() {
22-
const api = new Api({url: 'http://localhost'})
22+
const api = new NodeApi({url: 'http://localhost'})
2323
should(api.copy)
2424
.be.a.Function()
2525
.and.has.lengthOf(5)
@@ -77,17 +77,17 @@ describe('Create new instance for API', function() {
7777
})
7878

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

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

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

test/integration/batch.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/batch.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/copy.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/copy.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/count.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/count.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/create.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/create.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/edit.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/edit.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/editUsingGet.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/edit.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/execute.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import fixture from '../../fixtures/execute.json'
2121

2222
const API_URL = 'http://foobar:8080'

test/integration/get.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as fetchMock from 'fetch-mock'
1818
import should from 'should'
19-
import {Api} from '../../dist/index.es'
19+
import {Api} from '../../dist/workfront-api.es'
2020
import getFixture from '../../fixtures/get.json'
2121
import getMultipleFixture from '../../fixtures/get_multiple.json'
2222

0 commit comments

Comments
 (0)