I'm using Jasmine standalone https://github.com/jasmine/jasmine/releases
I have declared a global variable global_song in SpecRunner.html
(I can access it from chrome console so it's truly global) which includes script where I am trying to concatenate global_song to "should be able to play Song " :
it("should be able to play Song " + global_song, function() {
player.play(song);
expect(player.currentlyPlayingSong).toEqual(global_song);
//demonstrates use of custom matcher
expect(player).toBePlaying(song);
});
Why it cannot access global_song
variable ?
Update : expect(player.currentlyPlayingSong).toEqual(global_song)
works whereas it("should be able to play Song " + global_song
doesn't work.