Use jasmine.addMatchers instead of reaching through jasmine.Expectation [finishes #59518946]
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
jasmine.Expectation.addMatchers({
|
jasmine.addMatchers({
|
||||||
toBePlaying: function () {
|
toBePlaying: function () {
|
||||||
return {
|
return {
|
||||||
compare: function (actual, expected) {
|
compare: function (actual, expected) {
|
||||||
var player = actual;
|
var player = actual;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
pass: player.currentlyPlayingSong === expected && player.isPlaying
|
pass: player.currentlyPlayingSong === expected && player.isPlaying
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user