diff --git a/doc/7/getting-started/.react-native/package.json b/doc/7/getting-started/.react-native/package.json index 2715fc54b..270fbb877 100644 --- a/doc/7/getting-started/.react-native/package.json +++ b/doc/7/getting-started/.react-native/package.json @@ -7,7 +7,7 @@ "ios": "node_modules/.bin/expo-cli start --ios", "web": "node_modules/.bin/expo-cli start --web", "eject": "node_modules/.bin/expo-cli eject", - "test": "node_modules/.bin/cypress run --record" + "test": "node_modules/.bin/cypress run --record --key $CYPRESS_RECORD_KEY_DOC" }, "dependencies": { "cypress": "^3.8.1", diff --git a/doc/7/getting-started/.react/with-redux/package.json b/doc/7/getting-started/.react/with-redux/package.json index 2d4661e8f..6266aaee7 100644 --- a/doc/7/getting-started/.react/with-redux/package.json +++ b/doc/7/getting-started/.react/with-redux/package.json @@ -16,7 +16,7 @@ "postinstall": "if [ ! -f ../../../../../dist/kuzzle.js ]; then npm run build --prefix ../../../../../;fi && rm -rf ./node_modules/kuzzle-sdk/* && rsync -r --exclude 'getting-started' ../../../../../ ./node_modules/kuzzle-sdk", "start": "react-scripts start", "build": "react-scripts build", - "test": "./node_modules/.bin/cypress run --record", + "test": "./node_modules/.bin/cypress run --record --key $CYPRESS_RECORD_KEY_DOC", "eject": "react-scripts eject" }, "eslintConfig": { diff --git a/doc/7/getting-started/.vuejs/package.json b/doc/7/getting-started/.vuejs/package.json index d0c39fd37..55f01cfe4 100644 --- a/doc/7/getting-started/.vuejs/package.json +++ b/doc/7/getting-started/.vuejs/package.json @@ -10,7 +10,7 @@ "serve-with-vuex": "cd with-vuex && vue-cli-service serve", "build-with-vuex": "cd with-vuex && vue-cli-service build", "lint-with-vuex": "cd with-vuex && vue-cli-service lint", - "test": "./node_modules/.bin/cypress run --record" + "test": "./node_modules/.bin/cypress run --record --key $CYPRESS_RECORD_KEY_DOC" }, "dependencies": { "core-js": "^2.6.5", diff --git a/src/controllers/Realtime.ts b/src/controllers/Realtime.ts index 1d1b391c2..1d8c272fb 100644 --- a/src/controllers/Realtime.ts +++ b/src/controllers/Realtime.ts @@ -187,7 +187,7 @@ export class RealtimeController extends BaseController { }; return this.query(request, options) - .then(response => { + .then(() => { const rooms = this._subscriptions.get(roomId); if (rooms) { @@ -197,8 +197,6 @@ export class RealtimeController extends BaseController { this._subscriptions.delete(roomId); } - - return response.result; }); } diff --git a/test/controllers/realtime.test.js b/test/controllers/realtime.test.js index 698ecd767..da7ec971b 100644 --- a/test/controllers/realtime.test.js +++ b/test/controllers/realtime.test.js @@ -239,7 +239,7 @@ describe('Realtime Controller', () => { it('should call realtime/unsubscribe query with the roomId and return a Promise which resolves the roomId', () => { return kuzzle.realtime.unsubscribe(roomId, options) - .then(res => { + .then(() => { should(kuzzle.query) .be.calledOnce() .be.calledWith({ @@ -247,8 +247,6 @@ describe('Realtime Controller', () => { action: 'unsubscribe', body: {roomId} }, options); - - should(res).be.equal(roomId); }); }); });