Sorry for the layman terms but I don't know how else to put it.I need to pass a query string from the URL to a cookie I'm setting, using javascript.In JS i need to access document.location.search and then see if my ?ref=123123 sting is there.Now I don't know the right way to ask this, but how does one tell jasmine that the request coming in has a query string in the url.ThanksPhilip--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jasmine-js/-/zSAXonofOYgJ.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.
Jasmine itself doesn't deal with things that this level. It's just a syntax for describing tests, and assertion/matcher framework, a way to run tests, and a way to report them. Thus, Jasmine doesn't know it's in a browser.
So I think your question is more a how-to-test question than a how-does-Jasmine-do-this question.Are you trying to test-drive an object that reads the query string? What are you going to do with that information once you have it?--dwf
--
thx,--dwf
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jasmine-js/-/vqXQd1XojOwJ.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.
Jasmine is just JavaScript - there's nothing else below it.I'd write an object that does the cookie manipulation, then you'd be test driving the behavior of that object. I'd have it take the string directly instead of reading anything in document, mostly because the Jasmine runner "owns" document location.
--dwfif it's just a syntax with matcher/assertion framework, what is it running on top of then?
I'm going to grab the query string and add it to a cookie if a cookie isn't set.I can do it right now without tests, but thought that jasmine or a testing framework that it uses, or the server itself or something would pass it in.How would you test this?, if i may ask.ThanksPhilip
On Wednesday, August 1, 2012 5:07:05 PM UTC-4, DWF wrote:Jasmine itself doesn't deal with things that this level. It's just a syntax for describing tests, and assertion/matcher framework, a way to run tests, and a way to report them. Thus, Jasmine doesn't know it's in a browser.So I think your question is more a how-to-test question than a how-does-Jasmine-do-this question.Are you trying to test-drive an object that reads the query string? What are you going to do with that information once you have it?--dwf--
thx,--dwf
--
thx,--dwf
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jasmine-js/-/IL_bcdZ8fUQJ.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.