Skip to content

Commit 7293e84

Browse files
committed
Merge branch 'master' into release
2 parents c597743 + 35c3172 commit 7293e84

18 files changed

+429
-214
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
# The email address is not required for organizations.
77
#
8+
89
InternalFX <[email protected]>
910
Ivan Voznyakovsky <[email protected]>
1011
Jason Dobry <[email protected]>

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 3.0.0-rc.3 - 18 August 2016
2+
3+
###### Backwards compatible changes
4+
- #56 - Test Coverage (fetch, updateMany/createMany, addAction(s)) by @pik
5+
16
##### 3.0.0-rc.2 - 13 August 2016
27

38
###### Backwards compatible changes

fetch/karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports = function (config) {
5252
browsers: browsers,
5353
files: [
5454
'node_modules/babel-polyfill/dist/polyfill.js',
55+
'node_modules/whatwg-fetch/fetch.js',
5556
'node_modules/js-data/dist/js-data.js',
5657
'fetch/dist/js-data-fetch.js',
5758
'fetch/karma.start.js',

fetch/karma.start.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* global JSData:true, JSDataHttp:true, sinon:true, chai:true */
2+
23
before(function () {
34
var Test = this
5+
Test.TEST_FETCH = true
46
Test.fail = function (msg) {
57
if (msg instanceof Error) {
68
console.log(msg.stack)
@@ -14,7 +16,14 @@ before(function () {
1416
}
1517
Test.sinon = sinon
1618
Test.JSData = JSData
19+
Test.addAction = JSDataHttp.addAction
20+
Test.addActions = JSDataHttp.addActions
1721
Test.HttpAdapter = JSDataHttp.HttpAdapter
22+
23+
Test.store = new JSData.DataStore()
24+
Test.adapter = new Test.HttpAdapter()
25+
Test.store.registerAdapter('http', Test.adapter, { default: true })
26+
1827
Test.User = new JSData.Mapper({
1928
name: 'user'
2029
})
@@ -24,14 +33,13 @@ before(function () {
2433
basePath: 'api'
2534
})
2635

36+
Test.User.registerAdapter('http', Test.adapter, { default: true })
37+
Test.Post.registerAdapter('http', Test.adapter, { default: true })
2738
console.log('Testing against js-data ' + JSData.version.full)
2839
})
2940

3041
beforeEach(function () {
3142
var Test = this
32-
Test.adapter = new Test.HttpAdapter()
33-
Test.User.registerAdapter('http', Test.adapter, { default: true })
34-
Test.Post.registerAdapter('http', Test.adapter, { default: true })
3543

3644
Test.p1 = { author: 'John', age: 30, id: 5 }
3745
Test.p2 = { author: 'Sally', age: 31, id: 6 }

fetch/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-fetch",
33
"description": "HTTP adapter for js-data that uses the fetch API.",
4-
"version": "3.0.0-rc.2",
4+
"version": "3.0.0-rc.3",
55
"homepage": "https://github.com/js-data/js-data-http",
66
"repository": {
77
"type": "git",
@@ -18,11 +18,10 @@
1818
"axios",
1919
"rest",
2020
"adapter",
21-
"http",
22-
"fetch"
21+
"http"
2322
],
2423
"dependencies": {
25-
"js-data-adapter": "~0.8.1"
24+
"js-data-adapter": "~0.8.2"
2625
},
2726
"peerDependencies": {
2827
"js-data": "^3.0.0-rc.4"

karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports = function (config) {
5252
browsers: browsers,
5353
files: [
5454
'node_modules/babel-polyfill/dist/polyfill.js',
55+
'node_modules/whatwg-fetch/fetch.js',
5556
'node_modules/js-data/dist/js-data.js',
5657
'dist/js-data-http.js',
5758
'karma.start.js',

karma.start.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* global JSData:true, JSDataHttp:true, sinon:true, chai:true */
2+
23
before(function () {
34
var Test = this
5+
Test.TEST_FETCH = false
46
Test.fail = function (msg) {
57
if (msg instanceof Error) {
68
console.log(msg.stack)
@@ -14,7 +16,15 @@ before(function () {
1416
}
1517
Test.sinon = sinon
1618
Test.JSData = JSData
19+
Test.addAction = JSDataHttp.addAction
20+
Test.addActions = JSDataHttp.addActions
1721
Test.HttpAdapter = JSDataHttp.HttpAdapter
22+
23+
Test.store = new JSData.DataStore()
24+
Test.adapter = new Test.HttpAdapter()
25+
26+
Test.store.registerAdapter('http', Test.adapter, { default: true })
27+
1828
Test.User = new JSData.Mapper({
1929
name: 'user'
2030
})
@@ -24,14 +34,13 @@ before(function () {
2434
basePath: 'api'
2535
})
2636

37+
Test.User.registerAdapter('http', Test.adapter, { default: true })
38+
Test.Post.registerAdapter('http', Test.adapter, { default: true })
2739
console.log('Testing against js-data ' + JSData.version.full)
2840
})
2941

3042
beforeEach(function () {
3143
var Test = this
32-
Test.adapter = new Test.HttpAdapter()
33-
Test.User.registerAdapter('http', Test.adapter, { default: true })
34-
Test.Post.registerAdapter('http', Test.adapter, { default: true })
3544

3645
Test.p1 = { author: 'John', age: 30, id: 5 }
3746
Test.p2 = { author: 'Sally', age: 31, id: 6 }

node/mocha.start.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ before(function () {
1818
}
1919
Test.sinon = require('sinon')
2020
Test.JSData = require('js-data')
21+
Test.addAction = require('./dist/js-data-http-node').addAction
22+
Test.addActions = require('./dist/js-data-http-node').addActions
2123
Test.HttpAdapter = require('./dist/js-data-http-node').HttpAdapter
24+
Test.store = new Test.JSData.DataStore()
25+
Test.adapter = new Test.HttpAdapter()
26+
Test.store.registerAdapter('http', Test.adapter, { default: true })
27+
2228
Test.User = new Test.JSData.Mapper({
2329
name: 'user'
2430
})
@@ -28,15 +34,13 @@ before(function () {
2834
basePath: 'api'
2935
})
3036

37+
Test.User.registerAdapter('http', Test.adapter, { default: true })
38+
Test.Post.registerAdapter('http', Test.adapter, { default: true })
3139
console.log('Testing against js-data ' + Test.JSData.version.full)
3240
})
3341

3442
beforeEach(function () {
3543
var Test = this
36-
Test.adapter = new Test.HttpAdapter()
37-
Test.User.registerAdapter('http', Test.adapter, { default: true })
38-
Test.Post.registerAdapter('http', Test.adapter, { default: true })
39-
4044
Test.p1 = { author: 'John', age: 30, id: 5 }
4145
Test.p2 = { author: 'Sally', age: 31, id: 6 }
4246
Test.p3 = { author: 'Mike', age: 32, id: 7 }

node/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-http-node",
33
"description": "Node.js HTTP adapter for js-data.",
4-
"version": "3.0.0-rc.2",
4+
"version": "3.0.0-rc.3",
55
"homepage": "https://github.com/js-data/js-data-http",
66
"repository": {
77
"type": "git",
@@ -22,7 +22,7 @@
2222
"node.js"
2323
],
2424
"dependencies": {
25-
"js-data-adapter": "~0.8.1"
25+
"js-data-adapter": "~0.8.2"
2626
},
2727
"peerDependencies": {
2828
"axios": "^0.13.1",

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-http",
33
"description": "HTTP (XHR) adapter for js-data in the browser.",
4-
"version": "3.0.0-rc.2",
4+
"version": "3.0.0-rc.3",
55
"homepage": "https://github.com/js-data/js-data-http",
66
"repository": {
77
"type": "git",
@@ -24,6 +24,7 @@
2424
"rest",
2525
"adapter",
2626
"http",
27+
"fetch",
2728
"browser",
2829
"xhr"
2930
],
@@ -74,7 +75,7 @@
7475
"release": "npm test && npm run doc && repo-tools updates && repo-tools changelog && repo-tools authors"
7576
},
7677
"dependencies": {
77-
"js-data-adapter": "~0.8.1"
78+
"js-data-adapter": "~0.8.2"
7879
},
7980
"peerDependencies": {
8081
"js-data": "^3.0.0-rc.4"
@@ -95,6 +96,7 @@
9596
"phantomjs-prebuilt": "2.1.12",
9697
"rollup-plugin-commonjs": "3.3.1",
9798
"rollup-plugin-replace": "1.1.1",
98-
"uglify-js": "2.7.0"
99+
"uglify-js": "2.7.3",
100+
"whatwg-fetch": "1.0.0"
99101
}
100102
}

0 commit comments

Comments
 (0)