Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function doTest(fn, engine) {
let env = new ExecWrapper(engine, { icon: 'org.foo' }, {
functions: [{ selector: new Ast.Selector.Device('org.thingpedia.builtin.test', 'org.thingpedia.builtin.test', null), channel: 'get_data', type: 'query', }],
states: 0
}, {
output(icon, outputType, outputvalue) {
console.log('output', outputType, outputvalue);
},
error(icon, err) {
console.error(err);
}
});
return Promise.resolve((Utils.generatorToAsync(fn))(ThingTalk.Builtin, env));
}