twilio-labs / function-templates

Twilio Function templates for different Voice, SMS, Video, Chat, Sync, etc use cases
MIT License
345 stars 322 forks source link

Improve test harness #23

Open dkundel opened 5 years ago

dkundel commented 5 years ago

As mentioned in #18 we should be improving the test harness. I think we should be leveraging parts of the twilio-run tool for this since it is already putting effort in simulating the Twilio Runtime and therefore provides the right globals etc.

That way we only need to maintain one implementation to stay in sync with the actual Runtime.

philnash commented 5 years ago

Yeah, this is a good idea. What do you think to extracting the Runtime part of twilio-run to a twilio-runtime-mock module that the modules could share? (This small modules thing gets addictive doesn't it?) I guess it would be easier to have this repo depend on twilio-run and just pull the necessary bits out.

dkundel commented 5 years ago

Yeah I would say for now let's pull in twilio-run especially because it would also mean that you could easily manually test them by running twilio-run [path] but yeah I was thinking of pulling it out. We should create an issue for it for post SIGNAL.