Watson-Personal-Assistant / skill-sdk-nodejs

Other
2 stars 6 forks source link

Line Causing Tests to Fail #16

Open jordan-moore opened 6 years ago

jordan-moore commented 6 years ago

https://github.com/Watson-Personal-Assistant/skill-sdk-nodejs/blob/3eaadfbac5219a3f9f4f427cf156c73d1b628b3e/index.js#L8

Causing issues with the built in mocha tests. Causes the skill to look for wcs credentials in the wrong location

jordan-moore commented 6 years ago
const path = require('path');
var dotEnvPath = path.resolve('./.env');
require('dotenv').config({ path: dotEnvPath});

process.env.skillSDKResDir = path.dirname(dotEnvPath) + "/res";

^ Seems to fix the issue

Can't do a PR sadly.

jordan-moore commented 6 years ago

@offerakrabi @erezbi could we please get this fixed?

offerakrabi commented 6 years ago

sure, I'll fix it

offerakrabi commented 6 years ago

@jordan-moore I have a branch with a fix, you can use it and see if this works for you. We will run our tests on it before we merge it to master. In order to use this branch in your skill just change this line in your package.json: "skill-sdk-nodejs": "git+https://github.com/Watson-Personal-Assistant/skill-sdk-nodejs.git#offer_#16_fix_rootdir"