Skip to content

Change test plugin to a fragment (and some ideas to discuss)#6

Open
codecop wants to merge 7 commits intoactivelylazy:masterfrom
codecop:test-plugin-fragment
Open

Change test plugin to a fragment (and some ideas to discuss)#6
codecop wants to merge 7 commits intoactivelylazy:masterfrom
codecop:test-plugin-fragment

Conversation

@codecop
Copy link
Contributor

@codecop codecop commented Nov 19, 2011

Hi David,
most likely you are busy now, but I started doing some work on Rescripter again. Take your time...

The first thing is that I changed the test plugin to be a fragment of the editor plugin. This removed the need to expose internals by exporting it and to require anything but the test dependencies. A small thing. And then, as usual, I removed some warnings in the code (I have a reputation to keep ;-)

This is just the start. I was thinking about some things. Rescripter is in fact 3 things

  1. general JS invoker from Eclipse
  2. AST exposure to scripts
  3. Jasmine Test executor and result display

ad 1)
I thought about generalizing the invioker - as I'm more into Ruby, why not provide the same function to JRuby. First step would be to use the javax.script to call Rhino. I did this on a prototype, because I wanted to do some BDD Prime Factors Code Kata with Jasmine. This works and is not that much work. The only drawback is that javax.script does not offer me a way to provide the script as argument, so the error messages get less meaningful. Next would be to reimplement the system.rs files in Java, so they are available to all scripting languages. Then it should work with JRuby.

ad 3)
I don't know how, but if we factor out the Jasmine test execution and result reporting Java and JavaScript into a separate module, this might be interesting to the Jasmine community. (I hadn't known Jasmine, but after some experiments and trying to implement my own reporter I have to say, it's cooool. See https://bitbucket.org/pkofler/js-katas/src/tip/lib) I will not do that in my katas project, more likely I do a Jasmine-Ant integration. One would also have to separate the runner from the Jasmine specific logic so people could choose: scriptrunner + rhino + jasmine. Whereas a jruby user would select scriptrunner + jruby + rescriptor (AST). Then Jasmine would be integrated in the plugin's globals and would not have to be copied into every project/demo project.

What do you think about that?

Regards, Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments