Comments (8)
I am not sure what you are doing, but jasmine-node is an adapter which takes the jasmine project and makes it run under node.js, so that you run your tests in node.js. No browsers are involved at all. I think you may be confusing this with jasmine directly?
from jasmine-node.
I am almost positive that the tests were running in the browser being served up by node. I know this because I viewed the tests in several different browsers (after starting jasmine mon) and they failed in every browser but Chrome with errors that certain functions did not exist. These came about because only Chrome uses v8.
from jasmine-node.
We must have some fundamental misunderstanding here. Jasmine is a testing library which runs on browsers. Node-jasmine is a port of it to node and uses no browsers (everything runs in node.js). See: https://github.com/mhevery/jasmine-node/blob/master/specs.sh
from jasmine-node.
Right so you've now touched on the issue. I feel like an idiot right now but just bear with me. When I started with jasmine-node, I thought it was (as your totally say) for executing specs in node instead of the browser. Upon using the jasmine command line tool, I was overjoyed to see output directed to the browser and it displayed properly in Chrome. There was much rejoicing. However, this elation was cut short the second I used a test which used require. I got an error. In fact, using any node-specific functions got me errors. On a whim, I tried using other browsers and found that many tests failed. I tried to see what the problem could be because tests shouldn't fail depending on what browsers are used to view the results, right? The errors indicated that the tests which failed were ones which either themself used ES5 feautures or tested code which did! Since tests which executed using node features failed and tests which executed ES5 features present in v8 failed on non-v8-powered browsers, I determined that the tests must only be served up by node for execution in the browser.
Now, maybe this conclusion is dead wrong. If that is the case, then there are other problems because errors can be caused by the above conditions.
from jasmine-node.
"Upon using the jasmine command line tool, I was overjoyed to see output directed to the browser and it displayed properly in Chrome."
What exactly did you type?
There are no browsers in node-jasmine. The very fact that you are looking at something in a browser means that you and me are not on the same page.
What is it that you want to achieve?
Run all tests in node? use node-jasmine.
Run test in browser? use jasmine
Browsers don't need node, and node does not need browsers.
from jasmine-node.
Ok, so upon closer examination, I see that npm install jasmine
yields a different program from the one I am filing bugs on and, in fact and indeed, your wonderful software is not even available from npm at the current time.
I am sorry for wasting your time. While I'm here, do you have plans to make this available through npm? Sorry again...
from jasmine-node.
I think it would be nice if it would be available through npm, but I don't know enough about npm to have set it up.
from jasmine-node.
Actually, you are pretty much there!
npm init
can help you get the package.json set up properlynpm publish
will even publish it for you, etc.- You just need to make it so that the package.json knows that specs.js is an executable (in fact, rename it to jasmine-node or something)
I will gladly help test this before publishing, just let me know!
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.