Click here to Skip to main content
15,911,039 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Backups of backups Pin
Kirk 1038982115-May-17 5:55
Kirk 1038982115-May-17 5:55 
GeneralRe: Backups of backups Pin
Gerry Schmitz15-May-17 5:34
mveGerry Schmitz15-May-17 5:34 
GeneralRe: Backups of backups Pin
Harrison Pratt15-May-17 11:26
professionalHarrison Pratt15-May-17 11:26 
GeneralRe: Backups of backups Pin
Cornelius Henning15-May-17 12:07
professionalCornelius Henning15-May-17 12:07 
GeneralRe: Backups of backups Pin
rguilmette16-May-17 10:18
rguilmette16-May-17 10:18 
GeneralRe: Backups of backups Pin
Member 1052748415-May-17 23:32
Member 1052748415-May-17 23:32 
GeneralRe: Backups of backups Pin
James Lonero19-May-17 5:43
James Lonero19-May-17 5:43 
GeneralSame library, but different... Pin
Sander Rossel14-May-17 3:33
professionalSander Rossel14-May-17 3:33 
This is so nice.
I've got some Jasmine JavaScript tests that include NaN for my arrgh.js library, works fine.
Example:
JavaScript
it("should add NaN to the list", function () {
    var l = new arrgh.List();
    l.add(NaN);
    expect(l.toArray()).toEqual([NaN]);
});
No problem at all, even though NaN does not equal NaN.
The alternative is that I manually test the entire array (I've got some other tests involving NaN).

Now I decided to add support for Node.js.
So I install jasmine-node, load my tests using require(), run them and get the following error...
Expected [ NaN ] to equal [ NaN ].
Yes, I know NaN does not equal NaN, I know it's a friggin bitch to work with, that's why I'm specifically testing with NaN!
The browser framework does it right, it treats NaN to be NaN in such cases, or this kind of tests become pretty difficult to test.
So with Node.js support my library becomes a bit more difficult to test I guess Sigh | :sigh:
JavaScript
var arr = l.toArray();
expect(arr.length).toBe(1);
expect(arr[0]).toBeNaN();
On to the bigger tests... Sigh | :sigh:

GeneralRe: Same library, but different... Pin
Kornfeld Eliyahu Peter14-May-17 3:51
professionalKornfeld Eliyahu Peter14-May-17 3:51 
GeneralRe: Same library, but different... Pin
Sander Rossel14-May-17 4:00
professionalSander Rossel14-May-17 4:00 
GeneralRe: Same library, but different... Pin
peterchen14-May-17 21:33
peterchen14-May-17 21:33 
GeneralRe: Same library, but different... Pin
Sander Rossel14-May-17 22:29
professionalSander Rossel14-May-17 22:29 
GeneralRe: Same library, but different... Pin
Marc Clifton15-May-17 3:12
mvaMarc Clifton15-May-17 3:12 
GeneralRe: Same library, but different... Pin
Sander Rossel15-May-17 6:08
professionalSander Rossel15-May-17 6:08 
NewsMass Ransom Attack: The latest Pin
Cornelius Henning14-May-17 2:41
professionalCornelius Henning14-May-17 2:41 
GeneralRe: Mass Ransom Attack: The latest Pin
Richard MacCutchan14-May-17 3:07
mveRichard MacCutchan14-May-17 3:07 
GeneralRe: Mass Ransom Attack: The latest Pin
Daniel Pfeffer14-May-17 3:51
professionalDaniel Pfeffer14-May-17 3:51 
GeneralRe: Mass Ransom Attack: The latest Pin
ledtech314-May-17 3:46
ledtech314-May-17 3:46 
GeneralRe: Mass Ransom Attack: The latest Pin
Eddy Vluggen14-May-17 6:45
professionalEddy Vluggen14-May-17 6:45 
GeneralRe: Mass Ransom Attack: The latest Pin
W Balboos, GHB15-May-17 0:26
W Balboos, GHB15-May-17 0:26 
General:laugh: :laugh: :laugh: Pin
Kornfeld Eliyahu Peter14-May-17 1:37
professionalKornfeld Eliyahu Peter14-May-17 1:37 
GeneralRe: :laugh: :laugh: :laugh: Pin
Cornelius Henning14-May-17 2:42
professionalCornelius Henning14-May-17 2:42 
GeneralRe: :laugh: :laugh: :laugh: Pin
Kornfeld Eliyahu Peter14-May-17 3:04
professionalKornfeld Eliyahu Peter14-May-17 3:04 
GeneralRe: :laugh: :laugh: :laugh: Pin
Sander Rossel14-May-17 3:18
professionalSander Rossel14-May-17 3:18 
GeneralRe: :laugh: :laugh: :laugh: Pin
Midi_Mick14-May-17 3:39
professionalMidi_Mick14-May-17 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.