git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moving the easing check logic to the fx function, since Interface was overwriting...
[jquery.git]
/
src
/
fx
/
fxTest.js
diff --git
a/src/fx/fxTest.js
b/src/fx/fxTest.js
index
8c29de6
..
f7fb865
100644
(file)
--- a/
src/fx/fxTest.js
+++ b/
src/fx/fxTest.js
@@
-1,12
+1,22
@@
module("fx");
module("fx");
-test("animate(Hash, Object, Function) - assert that animate doesn't modify its arguments", function() {
+test("animate(Hash, Object, Function)", function() {
expect(1);
stop();
var hash = {opacity: 'show'};
var hashCopy = $.extend({}, hash);
expect(1);
stop();
var hash = {opacity: 'show'};
var hashCopy = $.extend({}, hash);
- $('#foo').animate(hash, 'fast', function() {
+ $('#foo').animate(hash, 0, function() {
ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
start();
});
ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
start();
});
+});
+
+test("toggle()", function() {
+ expect(3);
+ var x = $("#foo");
+ ok( x.is(":visible") );
+ x.toggle();
+ ok( x.is(":hidden") );
+ x.toggle();
+ ok( x.is(":visible") );
});
\ No newline at end of file
});
\ No newline at end of file