Code Monkey home page Code Monkey logo

Comments (17)

kuebk avatar kuebk commented on August 15, 2024

Seems like it already has been implemented: #47

But this solution is based on a regexp, what doesn't really lets you test just one file. In case you have multiple test files with exacly same name all of them will be run.

from jasmine-node.

 avatar commented on August 15, 2024

I can't see that option with:

jasmine-node --help

And it would be much easier to just run it with:

jasmine-node tests/file.spec.js

from jasmine-node.

booo avatar booo commented on August 15, 2024

Perhaps this fits your needs: https://github.com/booo/jasmine-node

Just run it on a single spec and everything should be fine.

from jasmine-node.

kuebk avatar kuebk commented on August 15, 2024

@booo I almost did it in same way as you did but there is one problem.

This way doesn't let you load helpers if you keep them in tests/ and your single test is in tests/template/BaseTemplate.js.

from jasmine-node.

booo avatar booo commented on August 15, 2024

Yeah but how should the system know... helpers could also be in tests/../../../behindTheMoon/ Perhaps search from the current working directory? In general I think the concept of the helper classes is strange and the hole loading of helpers is as well. I would include everything into my test via require or something else...

from jasmine-node.

kuebk avatar kuebk commented on August 15, 2024

Why would you want to do something manually while it can be done automatically?

from jasmine-node.

quangv avatar quangv commented on August 15, 2024

related to #27

I had thought before you cOuld run a single-spec... before 1.0.13 ... but maybe I just had a bug in my setup before...

from jasmine-node.

quangv avatar quangv commented on August 15, 2024

I stand corrected... maybe after node updated to 0.6.1 it screwed something up? Possibly have to do with cefebf0 ?

either way sucks, hopefully there's a simple fix :)

from jasmine-node.

okv avatar okv commented on August 15, 2024

When i run jasmine-node 1.0.12 on a single spec it's ok. But when i use jasmine-node 1.0.13 i got:
Error: ENOTDIR, Not a directory

from jasmine-node.

sanemat avatar sanemat commented on August 15, 2024

Me too.

from jasmine-node.

sanemat avatar sanemat commented on August 15, 2024

Below commit changes jasmine-node behavior.
d16f616

Parent commit can receive specific one file, eg.
$ jasmine-node foo-bar.js
parent commit:
2b99309

But d16f616 require directory. Below is error log, npm list and node version.
https://gist.github.com/1397379

from jasmine-node.

ericboehs avatar ericboehs commented on August 15, 2024

Right now I'm using 1.0.12 until this is fixed.

npm uninstall -g jasmine-node; npm install -g [email protected]

from jasmine-node.

rehanift avatar rehanift commented on August 15, 2024

I think this is fixed as of v1.0.17 (with node v0.6.6)

from jasmine-node.

okv avatar okv commented on August 15, 2024

run jasmine-node 1.0.20 on a single spec works fine (with node v0.4.12)

from jasmine-node.

vvs avatar vvs commented on August 15, 2024

With jasmine-node 1.0.21, it is possible to execute a single file spec, but the helpers are not loaded, which is rather inconvenient...

from jasmine-node.

kuebk avatar kuebk commented on August 15, 2024

Depends how you are going to run the test, lets say we have a file: GetProjectsMethodSpec.js in tests/ dir.

If you run it this way: jasmine-node --verbose tests/GetProjectsMethodSpec.js you will not get your helpers autoloaded
But if you run in that way: jasmine-node --verbose -m GetProjectsMethod tests/ you will get your helpers autoloaded.

from jasmine-node.

tebriel avatar tebriel commented on August 15, 2024

Now loading the helpers even if only a single file is specified. Available in beta branch currently.

from jasmine-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.