Naming JavaScript and CoffeeScript files the same thing #110

Closed
opened 2012-01-12 18:21:56 +00:00 by searls · 4 comments
searls commented 2012-01-12 18:21:56 +00:00 (Migrated from github.com)

So, I realize this isn't typical, but I have two files in my spec dir:

spec/
├── jasmine-given-spec.coffee
├── jasmine-given-spec.js

When I do this, I get erratic test output. One of two things happen, by chance:

  1. The coffee spec runs, the JavaScript does not run
  2. Neither runs (0 specs run)

In neither case will the JavaScript spec run.

Once I renamed one of the files, everything ran (and consistently):

spec/
├── jasmine-given-js-spec.js
├── jasmine-given-spec.coffee

So, I realize this isn't typical, but I have two files in my spec dir: ``` spec/ ├── jasmine-given-spec.coffee ├── jasmine-given-spec.js ``` When I do this, I get erratic test output. One of two things happen, by chance: 1. The coffee spec runs, the JavaScript does not run 2. Neither runs (0 specs run) In neither case will the JavaScript spec run. Once I renamed one of the files, everything ran (and consistently): ``` spec/ ├── jasmine-given-js-spec.js ├── jasmine-given-spec.coffee ```
johnbintz commented 2012-01-12 18:35:32 +00:00 (Migrated from github.com)

What would you expect the behavior to be?

What would you expect the behavior to be?
searls commented 2012-01-12 18:40:24 +00:00 (Migrated from github.com)

I would expect JHW to run both spec files like any other two
differently-named spec files. I may be conveying this poorly,
apologies.

On Jan 12, 2012, at 13:35, John Bintz
reply@reply.github.com
wrote:

What would you expect the behavior to be?


Reply to this email directly or view it on GitHub:
https://github.com/johnbintz/jasmine-headless-webkit/issues/110#issuecomment-3468123

I would expect JHW to run both spec files like any other two differently-named spec files. I may be conveying this poorly, apologies. On Jan 12, 2012, at 13:35, John Bintz reply@reply.github.com wrote: > What would you expect the behavior to be? > > --- > > Reply to this email directly or view it on GitHub: > https://github.com/johnbintz/jasmine-headless-webkit/issues/110#issuecomment-3468123
johnbintz commented 2012-01-12 18:44:38 +00:00 (Migrated from github.com)

All right, I'll add a scenario for this condition and look into it in a bit.

All right, I'll add a scenario for this condition and look into it in a bit.
johnbintz commented 2012-01-12 19:08:27 +00:00 (Migrated from github.com)

The issue was how I was comparing assets to each other to prevent multiple inclusion of files. I was comparing the logical path of the asset (in your case, jasmine-given-spec) to already-included assets, which means anything with the same signature will only get included once. I'm about to push a change that will instead compare the full paths of each asset. Let me know if this works better for you.

The issue was how I was comparing assets to each other to prevent multiple inclusion of files. I was comparing the logical path of the asset (in your case, `jasmine-given-spec`) to already-included assets, which means anything with the same signature will only get included once. I'm about to push a change that will instead compare the full paths of each asset. Let me know if this works better for you.
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#110
No description provided.