Issue with dynamic require statement #169

Open
opened 2012-09-28 14:01:47 +00:00 by paulyoung · 3 comments
paulyoung commented 2012-09-28 14:01:47 +00:00 (Migrated from github.com)

When I run tests I'm getting this error:

[coffeescript] Error in compiling file: /path/to/file

templates/#{path} not found

In that file, there's this

compiler = (path) ->
  return require("templates/#{path}")

What's strange is even if I comment out that line, it still fails. Only if I remove it will tests run.

When I run tests I'm getting this error: ``` Ruby [coffeescript] Error in compiling file: /path/to/file templates/#{path} not found ``` In that file, there's this ``` CoffeeScript compiler = (path) -> return require("templates/#{path}") ``` What's strange is even if I comment out that line, it still fails. Only if I remove it will tests run.
paulyoung commented 2012-09-28 14:03:35 +00:00 (Migrated from github.com)

I've resorted to this for now:

compiler = (path) ->
  return require("templates/" + path)
I've resorted to this for now: ``` CoffeeScript compiler = (path) -> return require("templates/" + path) ```
kowal commented 2012-10-15 18:44:04 +00:00 (Migrated from github.com)

@paulyoung are you using requireJS together with jasmine-headless-webkit?

@paulyoung are you using **requireJS** together with jasmine-headless-webkit?
paulyoung commented 2012-11-14 23:21:50 +00:00 (Migrated from github.com)

We were, but are using currently mocha, chai and sinon.

We were, but are using currently mocha, chai and sinon.
Sign in to join this conversation.
No Label
bug
doc
feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/jasmine-headless-webkit#169
No description provided.