From fe7bee6bf3ea306e3cc01f0ee8892faa0e217848 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Mon, 25 Feb 2019 18:43:27 -0900 Subject: [PATCH] fix(isCompatible): compatibility -> isCompatible --- doc/readme.md | 6 +++--- lib/auth-client.js | 2 +- test/end-to-end/auth-client.js | 6 +++--- test/unit/lib/auth-client.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/readme.md b/doc/readme.md index 377a18be..ee3f607d 100644 --- a/doc/readme.md +++ b/doc/readme.md @@ -303,7 +303,7 @@ Error thrown when gateway to Smartcar times out * [.getAuthUrl([options])](#AuthClient+getAuthUrl) ⇒ String * [.exchangeCode(code)](#AuthClient+exchangeCode) ⇒ [Promise.<Access>](#Access) * [.exchangeRefreshToken(token)](#AuthClient+exchangeRefreshToken) ⇒ [Promise.<Access>](#Access) - * [.compatibility(vin)](#AuthClient+compatibility) ⇒ Promise.<Boolean> + * [.isCompatible(vin)](#AuthClient+isCompatible) ⇒ Promise.<Boolean> @@ -373,9 +373,9 @@ Exchange a refresh token for a new access object. | --- | --- | --- | | token | String | Refresh token to exchange for a new set of Access and Refresh tokens. | - + -### authClient.compatibility(vin) ⇒ Promise.<Boolean> +### authClient.isCompatible(vin) ⇒ Promise.<Boolean> Determine whether a vehicle is compatible with Smartcar **Kind**: instance method of [AuthClient](#AuthClient) diff --git a/lib/auth-client.js b/lib/auth-client.js index 6231ea07..e658b61a 100644 --- a/lib/auth-client.js +++ b/lib/auth-client.js @@ -209,7 +209,7 @@ AuthClient.prototype.exchangeRefreshToken = function(token) { * @return {Promise.} true if the vehicle is compatible * with Smartcar */ -AuthClient.prototype.compatibility = function(vin) { +AuthClient.prototype.isCompatible = function(vin) { const qs = {vin}; diff --git a/test/end-to-end/auth-client.js b/test/end-to-end/auth-client.js index 38e82a7c..1ccd7b1b 100644 --- a/test/end-to-end/auth-client.js +++ b/test/end-to-end/auth-client.js @@ -53,14 +53,14 @@ test('exchangeRefreshToken', async(t) => { ]), []); }); -test('compatibility', async(t) => { +test('isCompatible', async(t) => { const client = new smartcar.AuthClient(getAuthClientParams()); const teslaVin = '5YJXCDE22HF068739'; const royceVin = 'SCA665C59HUX86700'; - const teslaComp = await client.compatibility(teslaVin); - const royceComp = await client.compatibility(royceVin); + const teslaComp = await client.isCompatible(teslaVin); + const royceComp = await client.isCompatible(royceVin); t.truthy(teslaComp); t.falsy(royceComp); diff --git a/test/unit/lib/auth-client.js b/test/unit/lib/auth-client.js index 4e37b8b9..c7458373 100644 --- a/test/unit/lib/auth-client.js +++ b/test/unit/lib/auth-client.js @@ -343,7 +343,7 @@ test('exchangeRefreshToken', async function(t) { }); -test('compatibility', async function(t) { +test('isCompatible', async function(t) { const client = new AuthClient({ clientId: CLIENT_ID, clientSecret: CLIENT_SECRET, @@ -363,7 +363,7 @@ test('compatibility', async function(t) { compatible: true, }); - const response = await client.compatibility(vin); + const response = await client.isCompatible(vin); t.is(response, true); t.true(n.isDone());