mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-02 17:15:24 +02:00
merge main
This commit is contained in:
commit
4c3584c3d2
2 changed files with 1 additions and 54 deletions
|
@ -26,57 +26,4 @@ describe('Promise animation', function() {
|
|||
animation.play();
|
||||
expect(value).toBe(1);
|
||||
});
|
||||
|
||||
it('Will resolve a deferred', function() {
|
||||
var value = 0;
|
||||
var closure = function() {
|
||||
value++;
|
||||
};
|
||||
|
||||
var animation = new PromiseAnimation({
|
||||
closure: closure
|
||||
});
|
||||
animation
|
||||
.then(function() {
|
||||
value++;
|
||||
})
|
||||
.then(function() {
|
||||
if (value !== 2) {
|
||||
console.log('second promise failed!!');
|
||||
} else {
|
||||
console.log('1 more test passed');
|
||||
}
|
||||
// TODO -- make this work (aka the tests keep running until
|
||||
// this assertion finishes
|
||||
expect(value).toBe(2);
|
||||
});
|
||||
|
||||
animation.play();
|
||||
expect(value).toBe(1);
|
||||
});
|
||||
|
||||
it('will make one from a normal animation', function() {
|
||||
// poor mans spy function
|
||||
var value = 0;
|
||||
var anim = new Animation({
|
||||
closure: function() { value++; }
|
||||
});
|
||||
|
||||
var animPromise = PromiseAnimation.fromAnimation(anim);
|
||||
animPromise
|
||||
.then(function() {
|
||||
value++;
|
||||
}).then(function() {
|
||||
// TODO fix
|
||||
expect(value).toBe(2);
|
||||
if (value !== 2) {
|
||||
console.log('a test failed!!');
|
||||
} else {
|
||||
console.log('another test passed');
|
||||
}
|
||||
});
|
||||
|
||||
animPromise.play();
|
||||
expect(value).toBe(1);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1792,7 +1792,7 @@ exports.strings = {
|
|||
'vi': 'Ẩn mục tiêu',
|
||||
'sl_SI': 'Skrij Cilj',
|
||||
'pl' : 'Ukryj cel',
|
||||
'it_IT': "Nasconti obiettivo",
|
||||
'it_IT': "Nascondi obiettivo",
|
||||
'ta_IN': 'இலக்கை மறை'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue