From da8f876c62f3a71a2cf5e9843128ff153781aebb Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Aug 2018 12:29:56 +0200 Subject: [PATCH 1/6] API docs -> WS --- packages/api-format/package.json | 4 +-- packages/api-provider/README.md | 4 +-- packages/api-provider/package.json | 6 ++-- packages/api-provider/src/http/index.ts | 12 +++++-- packages/api/package.json | 2 +- packages/type-extrinsics/package.json | 2 +- packages/type-params/package.json | 4 +-- packages/type-primitives/package.json | 4 +-- packages/type-storage/package.json | 6 ++-- yarn.lock | 44 ++++++++++++------------- 10 files changed, 47 insertions(+), 41 deletions(-) diff --git a/packages/api-format/package.json b/packages/api-format/package.json index 0ecaf57c0517..f664713814d8 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -32,7 +32,7 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/jsonrpc": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.7", - "@polkadot/util-keyring": "^0.28.7" + "@polkadot/util": "^0.28.13", + "@polkadot/util-keyring": "^0.28.13" } } diff --git a/packages/api-provider/README.md b/packages/api-provider/README.md index d5e92124a572..2e8bc1230340 100644 --- a/packages/api-provider/README.md +++ b/packages/api-provider/README.md @@ -23,9 +23,9 @@ npm install --save @polkadot/api-provider Initialisation - ```js -import HttpProvider from '@polkadot/api-provider/http'; +import WsProvider from '@polkadot/api-provider/ws'; -const provider = new HttpProvider('http://127.0.0.1:9933'); +const provider = new WsProvider('http://127.0.0.1:9944'); const version = await provider.send('client_version', []); console.log('clientVersion', version); diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index 7c8eb7a1d3b1..0f955b4479c2 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -35,9 +35,9 @@ "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/storage": "^0.28.22", - "@polkadot/util": "^0.28.7", - "@polkadot/util-crypto": "^0.28.7", - "@polkadot/util-keyring": "^0.28.7", + "@polkadot/util": "^0.28.13", + "@polkadot/util-crypto": "^0.28.13", + "@polkadot/util-keyring": "^0.28.13", "@types/nock": "^9.1.3", "eventemitter3": "^3.1.0", "isomorphic-fetch": "^2.2.1", diff --git a/packages/api-provider/src/http/index.ts b/packages/api-provider/src/http/index.ts index fb85376baf85..ade245802661 100644 --- a/packages/api-provider/src/http/index.ts +++ b/packages/api-provider/src/http/index.ts @@ -13,6 +13,8 @@ import logger from '@polkadot/util/logger'; import coder from '../coder/json'; +const ERROR_SUBSCRIBE = 'HTTP Provider does not have subscriptions, use WebSockets instead'; + export default class HttpProvider implements ProviderInterface { private coder: RpcCoder; private endpoint: string; @@ -31,7 +33,7 @@ export default class HttpProvider implements ProviderInterface { } on (type: ProviderInterface$Emitted, sub: ProviderInterface$EmitCb): void { - this.l.error(`Provider does not have 'on' emitters for type '${type}'`); + this.l.error(`HTTP Provider does not have 'on' emitters, use WebSockets instead`); } async send (method: string, params: Array): Promise { @@ -54,10 +56,14 @@ export default class HttpProvider implements ProviderInterface { } async subscribe (types: string, method: string, params: Array, cb: ProviderInterface$Callback): Promise { - throw new Error('Subscriptions has not been implemented'); + this.l.error(ERROR_SUBSCRIBE); + + throw new Error(ERROR_SUBSCRIBE); } async unsubscribe (type: string, method: string, id: number): Promise { - throw new Error('Subscriptions has not been implemented'); + this.l.error(ERROR_SUBSCRIBE); + + throw new Error(ERROR_SUBSCRIBE); } } diff --git a/packages/api/package.json b/packages/api/package.json index b6f139dfca04..a6f52e38aa95 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -34,6 +34,6 @@ "@polkadot/api-provider": "^0.28.22", "@polkadot/jsonrpc": "^0.28.22", "@polkadot/params": "^0.28.22", - "@polkadot/util": "^0.28.7" + "@polkadot/util": "^0.28.13" } } diff --git a/packages/type-extrinsics/package.json b/packages/type-extrinsics/package.json index ed2de555f4d5..1c1f6e7b0a6d 100644 --- a/packages/type-extrinsics/package.json +++ b/packages/type-extrinsics/package.json @@ -13,6 +13,6 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/params": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.7" + "@polkadot/util": "^0.28.13" } } diff --git a/packages/type-params/package.json b/packages/type-params/package.json index 0562a28fc01b..cc6deb816bb9 100644 --- a/packages/type-params/package.json +++ b/packages/type-params/package.json @@ -32,7 +32,7 @@ "@polkadot/extrinsics": "^0.28.22", "@polkadot/params": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.7", - "@polkadot/util-keyring": "^0.28.7" + "@polkadot/util": "^0.28.13", + "@polkadot/util-keyring": "^0.28.13" } } diff --git a/packages/type-primitives/package.json b/packages/type-primitives/package.json index 33dca09a2728..a6cdf53ae0dd 100644 --- a/packages/type-primitives/package.json +++ b/packages/type-primitives/package.json @@ -29,8 +29,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-primitives#readme", "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/trie-hash": "^0.28.7", - "@polkadot/util": "^0.28.7" + "@polkadot/trie-hash": "^0.28.13", + "@polkadot/util": "^0.28.13" }, "devDependencies": { "bn.js": "^4.11.8" diff --git a/packages/type-storage/package.json b/packages/type-storage/package.json index f3fe99cef4ad..aa21cb5c816d 100644 --- a/packages/type-storage/package.json +++ b/packages/type-storage/package.json @@ -32,8 +32,8 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/params": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.7", - "@polkadot/util-crypto": "^0.28.7", - "@polkadot/util-keyring": "^0.28.7" + "@polkadot/util": "^0.28.13", + "@polkadot/util-crypto": "^0.28.13", + "@polkadot/util-keyring": "^0.28.13" } } diff --git a/yarn.lock b/yarn.lock index b929112c9fb7..574d21d591e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1291,50 +1291,50 @@ typedoc-plugin-markdown "^1.1.13" typescript "^3.0.1" -"@polkadot/trie-hash@^0.28.7": - version "0.28.7" - resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.28.7.tgz#c1a91b0f2bf6e579c78d108a8e74cc1718464a5e" +"@polkadot/trie-hash@^0.28.13": + version "0.28.13" + resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.28.13.tgz#2e756f23e8433b28a08799cc60ea03acbe685671" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.7" - "@polkadot/util-crypto" "^0.28.7" - "@polkadot/util-rlp" "^0.28.7" + "@polkadot/util" "^0.28.13" + "@polkadot/util-crypto" "^0.28.13" + "@polkadot/util-rlp" "^0.28.13" "@polkadot/ts@^0.1.17": version "0.1.17" resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.17.tgz#0d85085038ae7e6757e059d07c8e9c54596919b3" -"@polkadot/util-crypto@^0.28.7": - version "0.28.7" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.28.7.tgz#f75f51be7ba27b21ea4d76e5099f894c16111fc8" +"@polkadot/util-crypto@^0.28.13": + version "0.28.13" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.28.13.tgz#c409d6b4cd64a5197faf84f9cd34909198ee3615" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.7" + "@polkadot/util" "^0.28.13" blakejs "^1.1.0" js-sha3 "^0.8.0" tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-keyring@^0.28.7": - version "0.28.7" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.28.7.tgz#c82390c18e719e57b4f65295e43fff7d7384519f" +"@polkadot/util-keyring@^0.28.13": + version "0.28.13" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.28.13.tgz#bf3cad2d969e97329c79ce61ddc2b908e57a074e" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.7" - "@polkadot/util-crypto" "^0.28.7" + "@polkadot/util" "^0.28.13" + "@polkadot/util-crypto" "^0.28.13" "@types/bs58" "^3.0.30" bs58 "^4.0.1" -"@polkadot/util-rlp@^0.28.7": - version "0.28.7" - resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.28.7.tgz#58d6661be3e9b4a66570efe5255776859476ab80" +"@polkadot/util-rlp@^0.28.13": + version "0.28.13" + resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.28.13.tgz#312644496a18138a8398ecc9b69c0259229bd0b2" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.7" + "@polkadot/util" "^0.28.13" -"@polkadot/util@^0.28.7": - version "0.28.7" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.28.7.tgz#abcf4e1735690e6a15a5fe44e5697b2911acf626" +"@polkadot/util@^0.28.13": + version "0.28.13" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.28.13.tgz#08588657bada691e2f4176e7754f6a83d2aa5c1e" dependencies: "@babel/runtime" "^7.0.0-rc.1" "@types/bn.js" "^4.11.1" From 04a91563094de88a8f913c73336080dabe3d0bed Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Aug 2018 12:33:34 +0200 Subject: [PATCH 2/6] API docs update --- packages/api/README.md | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/api/README.md b/packages/api/README.md index d07a242271d8..a05c96ef85fe 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -26,9 +26,9 @@ Initialisation - ```js import createApi from '@polkadot/api'; -import HttpProvider from '@polkadot/api-provider/http'; +import WsProvider from '@polkadot/api-provider/ws'; -const provider = new HttpProvider('http://127.0.0.1:9933'); +const provider = new HttpProvider('http://127.0.0.1:9944'); const api = createApi(provider); ``` @@ -40,3 +40,39 @@ api.chain .then((header) => console.log(header)) .catch((error) => console.error(error)); ``` + +Retrieving the best block - + +```js +api.chain + .getHead() + .then((headerHash) => { + return api.chain.getHeader(headerHash); + }) + .then((header) => { + console.log(`best #${header.number.toString()}`); + }) + .catch((error) => { + console.error('error:', error); + }); +``` + +Retrieving best best via subscription - + +```js +api.chain + .newHead((error, header) => { + if (error) { + console.error('error:', error); + } + + console.log(`best #${header.number.toString()}`); + }) + .then((subscriptionId) => { + // id for the subscription, can unsubscribe via + // api.chain.newHead.unsubscribe(subscriptionId) + }) + .catch((error) => { + console.error('error subscripbing:', error); + }); +``` From bb5e5ebc2d88c2e1cab40cecb255fc1c1239a87f Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Aug 2018 12:35:11 +0200 Subject: [PATCH 3/6] HttpProvider -> WsProvider --- packages/api/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/README.md b/packages/api/README.md index a05c96ef85fe..76ec53e0f68c 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -28,7 +28,7 @@ Initialisation - import createApi from '@polkadot/api'; import WsProvider from '@polkadot/api-provider/ws'; -const provider = new HttpProvider('http://127.0.0.1:9944'); +const provider = new WsProvider('http://127.0.0.1:9944'); const api = createApi(provider); ``` From 6bcb68e6a9ef70ed8804de811ebd54cdd1d01479 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Aug 2018 12:35:48 +0200 Subject: [PATCH 4/6] sub -> subscribing --- packages/api/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/README.md b/packages/api/README.md index 76ec53e0f68c..b8fad493b003 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -73,6 +73,6 @@ api.chain // api.chain.newHead.unsubscribe(subscriptionId) }) .catch((error) => { - console.error('error subscripbing:', error); + console.error('error subscribing:', error); }); ``` From 1cca5378a89049557aaf0140fe5d8d507039f7bb Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Aug 2018 12:41:26 +0200 Subject: [PATCH 5/6] Update dependencies --- packages/api-format/package.json | 4 +-- packages/api-provider/package.json | 6 ++-- packages/api/README.md | 4 +-- packages/api/package.json | 2 +- packages/type-extrinsics/package.json | 2 +- packages/type-params/package.json | 4 +-- packages/type-primitives/package.json | 4 +-- packages/type-storage/package.json | 6 ++-- yarn.lock | 44 +++++++++++++-------------- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/api-format/package.json b/packages/api-format/package.json index f664713814d8..4a945b32dc49 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -32,7 +32,7 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/jsonrpc": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.13", - "@polkadot/util-keyring": "^0.28.13" + "@polkadot/util": "^0.28.14", + "@polkadot/util-keyring": "^0.28.14" } } diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index 0f955b4479c2..923efb946e8c 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -35,9 +35,9 @@ "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/storage": "^0.28.22", - "@polkadot/util": "^0.28.13", - "@polkadot/util-crypto": "^0.28.13", - "@polkadot/util-keyring": "^0.28.13", + "@polkadot/util": "^0.28.14", + "@polkadot/util-crypto": "^0.28.14", + "@polkadot/util-keyring": "^0.28.14", "@types/nock": "^9.1.3", "eventemitter3": "^3.1.0", "isomorphic-fetch": "^2.2.1", diff --git a/packages/api/README.md b/packages/api/README.md index b8fad493b003..df2f8188f1c6 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -41,7 +41,7 @@ api.chain .catch((error) => console.error(error)); ``` -Retrieving the best block - +Retrieving the best block (once-off) - ```js api.chain @@ -57,7 +57,7 @@ api.chain }); ``` -Retrieving best best via subscription - +Retrieving best header via subscription - ```js api.chain diff --git a/packages/api/package.json b/packages/api/package.json index a6f52e38aa95..b17026733537 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -34,6 +34,6 @@ "@polkadot/api-provider": "^0.28.22", "@polkadot/jsonrpc": "^0.28.22", "@polkadot/params": "^0.28.22", - "@polkadot/util": "^0.28.13" + "@polkadot/util": "^0.28.14" } } diff --git a/packages/type-extrinsics/package.json b/packages/type-extrinsics/package.json index 1c1f6e7b0a6d..78791150bdd1 100644 --- a/packages/type-extrinsics/package.json +++ b/packages/type-extrinsics/package.json @@ -13,6 +13,6 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/params": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.13" + "@polkadot/util": "^0.28.14" } } diff --git a/packages/type-params/package.json b/packages/type-params/package.json index cc6deb816bb9..064b95109d46 100644 --- a/packages/type-params/package.json +++ b/packages/type-params/package.json @@ -32,7 +32,7 @@ "@polkadot/extrinsics": "^0.28.22", "@polkadot/params": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.13", - "@polkadot/util-keyring": "^0.28.13" + "@polkadot/util": "^0.28.14", + "@polkadot/util-keyring": "^0.28.14" } } diff --git a/packages/type-primitives/package.json b/packages/type-primitives/package.json index a6cdf53ae0dd..a859e73845b5 100644 --- a/packages/type-primitives/package.json +++ b/packages/type-primitives/package.json @@ -29,8 +29,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-primitives#readme", "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/trie-hash": "^0.28.13", - "@polkadot/util": "^0.28.13" + "@polkadot/trie-hash": "^0.28.14", + "@polkadot/util": "^0.28.14" }, "devDependencies": { "bn.js": "^4.11.8" diff --git a/packages/type-storage/package.json b/packages/type-storage/package.json index aa21cb5c816d..d7be2f302b76 100644 --- a/packages/type-storage/package.json +++ b/packages/type-storage/package.json @@ -32,8 +32,8 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/params": "^0.28.22", "@polkadot/primitives": "^0.28.22", - "@polkadot/util": "^0.28.13", - "@polkadot/util-crypto": "^0.28.13", - "@polkadot/util-keyring": "^0.28.13" + "@polkadot/util": "^0.28.14", + "@polkadot/util-crypto": "^0.28.14", + "@polkadot/util-keyring": "^0.28.14" } } diff --git a/yarn.lock b/yarn.lock index 574d21d591e3..6a8fc78bc6e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1291,50 +1291,50 @@ typedoc-plugin-markdown "^1.1.13" typescript "^3.0.1" -"@polkadot/trie-hash@^0.28.13": - version "0.28.13" - resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.28.13.tgz#2e756f23e8433b28a08799cc60ea03acbe685671" +"@polkadot/trie-hash@^0.28.14": + version "0.28.14" + resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.28.14.tgz#3a044ec108fd8a89e5119b9da8d8f42b73438c67" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.13" - "@polkadot/util-crypto" "^0.28.13" - "@polkadot/util-rlp" "^0.28.13" + "@polkadot/util" "^0.28.14" + "@polkadot/util-crypto" "^0.28.14" + "@polkadot/util-rlp" "^0.28.14" "@polkadot/ts@^0.1.17": version "0.1.17" resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.17.tgz#0d85085038ae7e6757e059d07c8e9c54596919b3" -"@polkadot/util-crypto@^0.28.13": - version "0.28.13" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.28.13.tgz#c409d6b4cd64a5197faf84f9cd34909198ee3615" +"@polkadot/util-crypto@^0.28.14": + version "0.28.14" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.28.14.tgz#552df2c403f0db0c601614bf2895f119fa7f26aa" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.13" + "@polkadot/util" "^0.28.14" blakejs "^1.1.0" js-sha3 "^0.8.0" tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-keyring@^0.28.13": - version "0.28.13" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.28.13.tgz#bf3cad2d969e97329c79ce61ddc2b908e57a074e" +"@polkadot/util-keyring@^0.28.14": + version "0.28.14" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.28.14.tgz#924df918e4eb5b476d47c643d40f82f6b7dc4ce1" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.13" - "@polkadot/util-crypto" "^0.28.13" + "@polkadot/util" "^0.28.14" + "@polkadot/util-crypto" "^0.28.14" "@types/bs58" "^3.0.30" bs58 "^4.0.1" -"@polkadot/util-rlp@^0.28.13": - version "0.28.13" - resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.28.13.tgz#312644496a18138a8398ecc9b69c0259229bd0b2" +"@polkadot/util-rlp@^0.28.14": + version "0.28.14" + resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.28.14.tgz#88cb3912430993bf03c9c7c9838a58c53416f7ed" dependencies: "@babel/runtime" "^7.0.0-rc.1" - "@polkadot/util" "^0.28.13" + "@polkadot/util" "^0.28.14" -"@polkadot/util@^0.28.13": - version "0.28.13" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.28.13.tgz#08588657bada691e2f4176e7754f6a83d2aa5c1e" +"@polkadot/util@^0.28.14": + version "0.28.14" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.28.14.tgz#994436b65cb7edbd88820d6a09a187c4438f10a5" dependencies: "@babel/runtime" "^7.0.0-rc.1" "@types/bn.js" "^4.11.1" From ec3689df88d1a99848534248444746e6baa9f585 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Aug 2018 14:19:49 +0200 Subject: [PATCH 6/6] Test message checks update --- packages/api-provider/src/http/index.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/api-provider/src/http/index.spec.js b/packages/api-provider/src/http/index.spec.js index f454b05c7d8b..7b68ba6c4979 100644 --- a/packages/api-provider/src/http/index.spec.js +++ b/packages/api-provider/src/http/index.spec.js @@ -31,13 +31,13 @@ describe('Http', () => { it('does not (yet) support subscribe', () => { return http.subscribe().catch((error) => { - expect(error.message).toMatch(/has not been implemented/); + expect(error.message).toMatch(/does not have subscriptions/); }); }); it('does not (yet) support unsubscribe', () => { return http.unsubscribe().catch((error) => { - expect(error.message).toMatch(/has not been implemented/); + expect(error.message).toMatch(/does not have subscriptions/); }); }); });