Failure tests for easier testing (disabled)
This commit is contained in:
parent
910418f83b
commit
5cea4291f4
40
test/fixtures/pivotal/spec/PlayerSpec.js
vendored
40
test/fixtures/pivotal/spec/PlayerSpec.js
vendored
@ -43,16 +43,52 @@ describe("Player", function() {
|
|||||||
player.makeFavorite();
|
player.makeFavorite();
|
||||||
|
|
||||||
expect(song.persistFavoriteStatus).toHaveBeenCalledWith(true);
|
expect(song.persistFavoriteStatus).toHaveBeenCalledWith(true);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//demonstrates use of expected exceptions
|
//demonstrates use of expected exceptions
|
||||||
describe("#resume", function() {
|
describe("#resume", function() {
|
||||||
it("should throw an exception if song is already playing", function() {
|
it("should throw an exception if song is already playing", function() {
|
||||||
player.play(song);
|
player.play(song);
|
||||||
|
|
||||||
expect(function() {
|
expect(function() {
|
||||||
player.resume();
|
player.resume();
|
||||||
}).toThrow("song is already playing");
|
}).toThrow("song is already playing");
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user