/** * @fileOverview * * Created on 8/24/16. * @author Siggi Orn */ const jibo = require('../../jibo'); const path = require('path'); const RegistryClient = require('skills-service-manager').RegistryClient; const Factory = require('skills-service-manager').Factory; /** * Initializes a test version of jibo * @param {function} done */ function beforeTests(done) { let factory = new Factory({ RegistryService: { host: '127.0.0.1', port: 0 }, services: { JetstreamServiceSim: { port: 0 }, AudioServiceSim: { port: 0 }, BodyService: { port: 0 }, DevShell: { port: 0 }, ErrorService: { port: 0 }, ExpressionService: { port: 0 }, GlobalManagerService: { port: 0 }, KBService: { port: 0 }, LPSService: { port: 0 }, MediaManagerService: { port: 0 }, MediaService: { port: 0 }, NotificationsService: { port: 0 }, PerformanceService: { port: 0 }, SchedulerService: { port: 0 }, SecureTransferServiceSim: { port: 0 }, ServerService: { port: 0 }, SkillsServiceSim: { port: 0, skillsBaseDir: path.join(__dirname, '..') }, SystemManagerService: { port: 0 }, SystemMonitoringServiceSim: { port: 0 }, TTSService: { port: 0 }, WifiService: { port: 0 }, } }, __dirname); factory.init(function(error){ if (error) { return done(error); } process.env.runMode = jibo.RunMode.SIMULATOR; jibo.init({ registryHost: "http://127.0.0.1:" + RegistryClient.instance.port + "/registry" }, function(error){ if (error) { return done(error); } done(); }); }); } function afterTests() { } module.exports = { beforeTests, afterTests };