File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < title > jQuery UI Observable Test Suite</ title >
6
+
7
+ < script src ="../../jquery.js "> </ script >
8
+ < script src ="../../resource_loader.js "> </ script >
9
+ < script >
10
+ loadResources ( {
11
+ css : [ "ui.core" ] ,
12
+ js : [
13
+ "ui/jquery.ui.observable.js"
14
+ ]
15
+ } ) ;
16
+ </ script >
17
+
18
+ < link rel ="stylesheet " href ="../../../external/qunit.css ">
19
+ < script src ="../../../external/qunit.js "> </ script >
20
+ < script src ="../testsuite.js "> </ script >
21
+
22
+ < script src ="observable_core.js "> </ script >
23
+
24
+ < script src ="../swarminject.js "> </ script >
25
+ </ head >
26
+ < body >
27
+
28
+ < h1 id ="qunit-header "> jQuery UI Observable Test Suite</ h1 >
29
+ < h2 id ="qunit-banner "> </ h2 >
30
+ < div id ="qunit-testrunner-toolbar "> </ div >
31
+ < h2 id ="qunit-userAgent "> </ h2 >
32
+ < ol id ="qunit-tests "> </ ol >
33
+ < div id ="qunit-fixture ">
34
+ </ div >
35
+ </ body >
36
+ </ html >
Original file line number Diff line number Diff line change
1
+ ( function ( $ ) {
2
+
3
+ module ( "property" ) ;
4
+
5
+ function create ( ) {
6
+ return {
7
+ name : "Peter"
8
+ } ;
9
+ }
10
+
11
+ test ( "key, value" , function ( ) {
12
+ expect ( 3 ) ;
13
+ var object = create ( ) ;
14
+ $ . observable ( object ) . bind ( "change" , function ( event , ui ) {
15
+ deepEqual ( ui . oldValues , { name : "Peter" } ) ;
16
+ deepEqual ( ui . newValues , { name : "Pan" } ) ;
17
+ } ) . property ( "name" , "Pan" ) ;
18
+ equal ( object . name , "Pan" ) ;
19
+ } ) ;
20
+
21
+ } ( jQuery ) ) ;
You can’t perform that action at this time.
0 commit comments