As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We have been using jasmine for a while now. We have written specs for about 20% code. Most of our code is tightly coupled with DOM elements which makes it extremely difficult to test. Now we would like to re-factor our code and make it testable with jasmine.
So my question is: Which JavaScript pattern has got an edge in terms of testing (jasmine) ease and why?
Update: I did some research and found couple of useful tips:
Private Methods and Properties are difficult to test, so avoid if testing is preference.
JQuery Chaining: Again chaining is recommended for performance but excessive use will not be recommended for unit test.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I’ve heard the statement that Python would be too slow to be of any use in browsers.
I reckon Javascript is only superior in this aspect because of companies like Google who need it fast (and made it fast) because they need it to survive, but I could be wrong.
Are there any differences in how Python and JS are designed that have an impact on how they (would) perform in browsers?
There is a project named Brython designed to replace JavaScript as the scripting language for the web.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What are some of the secure/reliable crypto libraries for JavaScript? For those who have used it, what are your opinion about them? Thanks.
Google Closure
Used Google's closure library quite successfully for a while
https://developers.google.com/closure/library/
Specific crypt documentation here
http://closure-library.googlecode.com/svn/docs/namespace_goog_crypt.html
phpjs.org
Occasionally for simpler tasks I have also used self-contained functions such as md5 or sha1 from phpjs.org
crypto-js
Although never used personally, I heard very good things about this library
http://code.google.com/p/crypto-js/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
with is so bad that it is forbidden in ES5 strict mode.
Function constructor is very slow.
Yet,
John Resig's micro templating is advertised as light, uses both mentioned bad features of Javascript. (same with another light templating - underscore's, which is a fork of it)
Now a question:
How seriously should i be concerned about performance impact of using those template engines ?
Should i sacrifice their flexibility and simplicity for speed gains that other engines (like Mustache, or XTemplates) might provide ?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've used Backbone.js, I've learned about Knockout.js; however, now I found out about Knockback.js. It is supposed to get the best out of the other two tried& proven frameworks.
Do you have any experience with Knockback in production? I'm wary to use it since it doesn't seem to be mature enough.
I've been using Knockback on a large multi-module project with good results. The docs and examples are unnecessarily complex, so I wrote a blog describing Knockback with some very simple examples and a JSFiddle to get you started.
http://www.geekdave.com/?p=79
Feedback is most welcome!
I wouldn't use it yet. It's hard enough to get corporate buy in on knockoutJS.
I guess it all has to do with the size of your company, the willingness to support alpha / beta / volatile open source projects.
It is the nature of the beast, this bleeding edge of innovation. Skating that thin ice of unsuportability.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
What is the recommended way of unit testing javascript and jQuery?
What frameworks?
Does the framework
integrate with build tools? (CI,
maven and such)
Please share your experiences in this field.
I'm using this: jQuery QUnit
jQuery unit testing library
Samples for QUnit
Manual to start
Maven plugin
Also, can check this solution (found in my bookmarks): js-test-driver
You might have heard of JsUnit. That's what I've used in the past.