jasmine / IdeaJasmine

12 stars 5 forks source link

Allow configuration of jasmine script instead of package #1

Closed sambbaron closed 6 years ago

sambbaron commented 6 years ago

First, thanks for creating this plugin! I look forward to its continued development. So I have a TypeScript project where I am using jasmine-ts to wrap jasmine with ts-node. It would be great to be able to use this plugin with jasmine-ts or any other package that wraps jasmine.

Right now, I have a temporary workaround. Since the plugin is looking for 'package/bin/jasmine.js', which is not included in jasmine-ts, I copied 'jasmine-ts/lib/index.js' to 'jasmine-ts/bin/jasmine.js'. Then I pointed the "Jasmine package" to jasmine-ts.

So with my workaround, I would need to configure the jasmine script instead of the package. I'm not sure if this workable or would even break the plugin in the future. I'm open to any thoughts on this.

slackersoft commented 6 years ago

I went a bit back and forth on this one when I was putting the options together. I had some better examples on how to allow a user to pick a Node.js package and then tack the executable onto that, so that's what I went with.

I would be happy to review a pull request to either:

svenhaag commented 6 years ago

i think you just need to remove the "bin" from here: https://github.com/jasmine/IdeaJasmine/blob/172a6010746a7770ddb920d22ad141665a919acf/src/io/pivotal/intellij/jasmine/JasmineRunProfileState.kt#L72

slackersoft commented 6 years ago

I don't think it will be quite as simple as just removing bin from this path, as that would make it look for a jasmine.js file in the root of whichever npm package was selected. This definitely won't work for Jasmine itself, and isn't quite what we want for other packages either.

michDostal commented 6 years ago

is there any solution yet? I am in the same situation as @sambbaron. We have typescript project and we would like to be able run our single tests from IDE instead of running all of them from command-line. Thank you for reply.

svenhaag commented 6 years ago

I'm using plain Maven/IntelliJ functionallity like so:

In IntelliJ, go to:

  1. View --> Tools Windows --> Maven Projects
  2. Navigate to your project containing the jasmine test
  3. Expand --> Plugins --> jasmine --> there you go!

or the plain maven way in console:

slackersoft commented 6 years ago

@svenhaag is that comment meant for this issue or #2?

svenhaag commented 6 years ago

@slackersoft sorry, it was meant for the whole plugin purpose actually. Specifically answering @house-md question. Cheers!