Skip to content

Commit 4f0ffda

Browse files
committed
2.0.0
1 parent b722313 commit 4f0ffda

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<a name="2.0.0"></a>
2+
# 2.0.0 (2017-03-15)
3+
4+
* revert(version): 1.1.0 ([af6eec8](https://github.com/auru/unity-api/commit/af6eec8))
5+
* chore(package): update sinon to version 2.0.0 ([c25bc8c](https://github.com/auru/unity-api/commit/c25bc8c))* perf(fetch): add content body, when throw Error ([7365a02](https://github.com/auru/unity-api/commit/7365a02))
6+
* chore(package): update babel-polyfill to version 6.23.0 (#16) ([9aa1a4e](https://github.com/auru/unity-api/commit/9aa1a4e))
7+
* feat: shortcuts for HTTP methods (#15) ([ec4a8d1](https://github.com/auru/unity-api/commit/ec4a8d1))
8+
* test: fix tests descriptions ([57c0dcc](https://github.com/auru/unity-api/commit/57c0dcc))
9+
* test: use t.context for shared vars ([4a10e03](https://github.com/auru/unity-api/commit/4a10e03))
10+
11+
12+
113
<a name="1.0.5"></a>
214
## 1.0.5 (2017-02-08)
315

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unity-api",
3-
"version": "1.0.5",
3+
"version": "2.0.0",
44
"description": "REST-API helper, wrapped around fetch.",
55
"main": "dist/index.js",
66
"scripts": {

src/createAPI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ const createAPI = (
3232
return api;
3333
}, {});
3434

35-
export default createAPI;
35+
export default createAPI;

test/createAPI.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ test('supports resource prefix insted of namespace', t => {
3333
}
3434
};
3535
const resources = { user };
36-
const API = createAPI(resources, [], 'https://example.com', {});
36+
const API = createAPI(resources, [], 'https://example.com');
3737

3838
API.user.get(1);
3939

4040
t.true(t.context.stubCallAPIMethod.calledWithExactly(
41-
null, 'https://example.com', {}, 'user-endpoint'
41+
null, 'https://example.com', undefined, 'user-endpoint'
4242
), 'correct arguments passed to callAPIMethod');
4343
});
4444

@@ -65,7 +65,7 @@ test('general behaviour', t => {
6565

6666
const middleware = [ _ => _, _ => _];
6767

68-
const API = createAPI(resources, middleware, 'https://example.com', {});
68+
const API = createAPI(resources, middleware, 'https://example.com');
6969

7070
t.deepEqual(Object.keys(API), ['user', 'project'], 'resources');
7171

@@ -83,7 +83,7 @@ test('general behaviour', t => {
8383
t.true(t.context.stubApplyMiddleware.calledOnce);
8484
t.true(t.context.stubCallAPIMethod.calledBefore(t.context.stubApplyMiddleware));
8585
t.true(t.context.stubCallAPIMethod.calledWithExactly(
86-
null, 'https://example.com', {}, 'user'
86+
null, 'https://example.com', undefined, 'user'
8787
));
8888

8989
t.is(t.context.stubApplyMiddleware.lastCall.args[0], boundCallAPIMethod, 'applyMiddleware called with boundCallAPIMethod');
@@ -100,4 +100,4 @@ test('general behaviour', t => {
100100
t.true(t.context.stubCallAPIMethod.calledTwice);
101101
t.true(t.context.stubApplyMiddleware.calledTwice);
102102
t.true(t.context.stubCallAPIMethod.calledBefore(t.context.stubApplyMiddleware));
103-
});
103+
});

0 commit comments

Comments
 (0)