sporto / planetproto

Understanding JavaScript Prototypes - Workshop
221 stars 58 forks source link

Upgrading 'verify' to allow defining run configuration #23

Closed grabbou closed 9 years ago

grabbou commented 9 years ago

Hey,

I've borrowed your code and adapted to my workshop I am currently working on. I kinda wanted to define run environment as well so users can test their code without calling verify all the time.

Here's the suite.js file (in your project it's verify.js that defines two methods). https://github.com/grabbou/nodeschool-eventemitter/blob/master/exercises/study_events/suite.js

I've also added runProcessor here: https://github.com/grabbou/nodeschool-eventemitter/blob/master/utils/wrapExercise.js#L48

and changed loadUserModule so it loads proper path no matter whether it's verify or run setup. https://github.com/grabbou/nodeschool-eventemitter/blob/master/utils/helpers.js#L11-L14

What do you think? Is it worth including or did you sort out this particular issue differently?

sporto commented 9 years ago

Thanks, I have incorporated some of your changes, however I am still having issues with run and injecting globals into it. I will probably wait until workshopper hits 1.0 to attempt a fix

grabbou commented 9 years ago

Yeah, cool. Let me know if you have any updates on that. I am not using globals so this might be the case. Anyway - for now it works quite nicely and does the job so I will wait with rewrite till you publish some changes.

If you will need any help with getting those things done - let me know.