From 352c39a46b6d158cb873568d82301e453cc6e8b1 Mon Sep 17 00:00:00 2001 From: Louistiti Date: Sat, 4 May 2019 08:48:59 +0800 Subject: [PATCH] test(server): fix units to introduce modules actions --- server/src/core/synchronizer.js | 3 ++- test/unit/server/core/brain.spec.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/core/synchronizer.js b/server/src/core/synchronizer.js index 98e8ea1e..a3f2a79e 100644 --- a/server/src/core/synchronizer.js +++ b/server/src/core/synchronizer.js @@ -43,7 +43,8 @@ class Synchronizer { return new Promise((resolve) => { this.brain.socket.emit('download', { package: this.classification.package, - module: this.classification.module + module: this.classification.module, + action: this.classification.action }) resolve() diff --git a/test/unit/server/core/brain.spec.js b/test/unit/server/core/brain.spec.js index b08c840b..11c0d194 100644 --- a/test/unit/server/core/brain.spec.js +++ b/test/unit/server/core/brain.spec.js @@ -71,6 +71,7 @@ describe('brain', () => { classification: { package: 'leon', module: 'greeting', + action: 'run', confidence: 0.9 } } @@ -97,6 +98,7 @@ describe('brain', () => { classification: { package: 'checker', module: 'isitdown', + action: 'run', confidence: 0.9 } } @@ -116,6 +118,7 @@ describe('brain', () => { classification: { package: 'leon', module: 'greeting', + action: 'run', confidence: 0.9 } }