From 5cea4291f4aad8b0b20bdef48ef1e0217a970b2f Mon Sep 17 00:00:00 2001 From: NeverI Date: Sun, 24 Feb 2013 01:47:58 +0100 Subject: [PATCH] Failure tests for easier testing (disabled) --- test/fixtures/pivotal/spec/PlayerSpec.js | 40 ++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/test/fixtures/pivotal/spec/PlayerSpec.js b/test/fixtures/pivotal/spec/PlayerSpec.js index 79f1022..c311798 100644 --- a/test/fixtures/pivotal/spec/PlayerSpec.js +++ b/test/fixtures/pivotal/spec/PlayerSpec.js @@ -43,16 +43,52 @@ describe("Player", function() { player.makeFavorite(); expect(song.persistFavoriteStatus).toHaveBeenCalledWith(true); + }); //demonstrates use of expected exceptions describe("#resume", function() { it("should throw an exception if song is already playing", function() { player.play(song); - expect(function() { player.resume(); }).toThrow("song is already playing"); + }); }); -}); \ No newline at end of file +}); + +xdescribe("Failed level 1", function() { + it("should not pass", function() { + expect(true).toBe(false); + + }); + + describe('Level 2', function() { + it('should pass', function() { + expect(true).toBe(true); + }); + + describe('Level 3', function() { + it('should not pass', function() { + expect(true).toBe(true); + expect(true).toBe(true); + expect(true).toBe(false); + expect(true).toBe(true); + }); + + describe('Level 4', function() { + it('should pass', function() { + expect(true).toBe(true); + }); + it('should not pass', function() { + expect(true).toBe(asdf); + }); + }) + + it('should pass', function() { + expect(true).toBe(true); + }); + }) + }); +});