Comments (17)
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.
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.
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.
@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.
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.
Why would you want to do something manually while it can be done automatically?
from jasmine-node.
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.
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.
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.
Me too.
from jasmine-node.
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.
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.
I think this is fixed as of v1.0.17 (with node v0.6.6)
from jasmine-node.
run jasmine-node 1.0.20 on a single spec works fine (with node v0.4.12)
from jasmine-node.
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.
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.
Now loading the helpers even if only a single file is specified. Available in beta branch currently.
from jasmine-node.
Related Issues (20)
- Combination of --verbose and --noStack
- Upgrade gaze version HOT 2
- What's the status of this project? HOT 5
- jasmine-node can't find tests HOT 1
- --forceExit option on v2.0.0 beta not working
- jasmine.any(Array) breaks when vm.runInNewContext is used
- jasmine-node file.js take long time
- Command Injection due to old node-modules HOT 6
- Dependency coffee-script triggers a failure on Windows. HOT 1
- (node:10112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'isBllingPaymentLinkDisplayed' of undefined
- SyntaxError: Unexpected token import HOT 1
- npm updates badly needed HOT 3
- v1.14/v1.15 includes a breaking change in a minor version. HOT 16
- Enable Travis CI for Node.js 0.x, 4, 6, 8, 10
- Use tilde (~) instead of carrot (^) in version 1 HOT 1
- New major release - feature release HOT 1
- 2.0 BETA with Jasmine 2.0 & rewrite in CoffeeScript no longer supported
- major: use please-upgrade-node
- Slow Uint8Array comparison HOT 1
- Vulnerability in dependency underscore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasmine-node.