Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HelloDecafTest Cannot find coffee file #8

Closed
mrt123 opened this issue Dec 4, 2015 · 12 comments
Closed

HelloDecafTest Cannot find coffee file #8

mrt123 opened this issue Dec 4, 2015 · 12 comments

Comments

@mrt123
Copy link

mrt123 commented Dec 4, 2015

Hi,

I have followed: #5
and changed my COMMAND_PATTERN=decaf %p (running on OSX)

Everything else is the same as in https://github.com/limadelic/decaf/wiki/Hello-Decaf

When running http://localhost:8080/HelloDecafTest?test i get:
Could not complete testing: fitnesse.slim.SlimError: Error SLiM server died before a connection could be established. env: coffee: No such file or directory

@noamtcohen
Copy link

@mrt123 where you able to resolve this?

@mrt123
Copy link
Author

mrt123 commented Dec 31, 2015

@noamtcohen issue is still there for me

@noamtcohen
Copy link

This is how I proceeded:
After install decaf in the directory where fitnesse.jar is (not globally)
on http://localhost:8080/root?edit I made this change:

!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {node node_modules/decaf/lib/decaf %p}

so now I'm getting a different error that the class I'm try to test was not found: Cannot find greeter

@msuarz
Copy link
Member

msuarz commented Dec 31, 2015

sorry i am late to the party ... i've been in NY on holidays ... i'll check this as soon as possible

@noamtcohen
Copy link

If I change the example and rename from greeter.coffee:

class @Greeter
  hello: (who) -> "Hello #{who}!"

to greetet.js:

function Greeter(){

}

I'm green on the imports but I get these errors:

TypeError: Cannot read property 'Greeter' of undefined
TypeError: Cannot read property 'sut' of undefined

@noamtcohen
Copy link

@mrt123 I put together a demo, please download the zip and see the readme. let me know if this works for you.
https://github.com/noamtcohen/FitnesseWithCoffee

@mrt123
Copy link
Author

mrt123 commented Jan 6, 2016

@noamtcohen thanks , this worked

@noamtcohen
Copy link

@mrt123, regarding you question about protractor. protractor is build on top WebDriverJs so you could just use WebDriverJs from within your node test suite. FitNesee runs test files, protractor runs test files. What you could do is invoke protractor from your node test file (via fork or spawn) and then parse the output of protractor and send it back to FitNesse. I'm working on a project to support this kind of functionality (but not specific to protractor): SlimJS. Please post your questions on the SlimJS repo, Cheers.

@msuarz
Copy link
Member

msuarz commented Jan 9, 2016

Hi there ... i finally got some time to test this ... this was working for me on a mac ....

!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {decaf %p}
!path fixtures

|import|
|greeter|

|script|Greeter|
|check|hello|Decaf|Hello Decaf!|

@noamtcohen
Copy link

@msuarz thanks you checking this for us.
I've started a new project SlimJS. It an async nodejs slim server. This is better for my use case since all of my javascript code is written in javascript, I don't see a reason to learn coffeescript and I need it to asynchronous.
Thanks again for helping out.

@msuarz
Copy link
Member

msuarz commented Jan 10, 2016

no worries the hate on coffeescript is strong out there :) ... i've learned to ignore it ... a couple of things ...

. decaf should work the same for js than for coffee ... 'cos coffee is js
. good luck with the async implementation ... i've though bout it a few times ... fitnesse/slim is not going to help u ... u end up with async steps but they don't nest ... so all u get is a callback per step ala cucumber.js
. and good luck with ppl testing at this level of abstraction in javascript :) ... that's ultimately the biggest letdown for me

@msuarz msuarz closed this as completed Jan 10, 2016
@noamtcohen
Copy link

I don't hate coffee I just don't understand its need. (as for TS)
It's ok that the callback is per step and it makes sense, I need the async functionality since most useful code in nodejs is async. What is ppl testing?

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

No branches or pull requests

3 participants