Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / grunt / tasks / init / jquery / root / test / name_test.js
1 /*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/
2 /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/
3 /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/
4 (function($) {
5
6   /*
7     ======== A Handy Little QUnit Reference ========
8     http://docs.jquery.com/QUnit
9
10     Test methods:
11       expect(numAssertions)
12       stop(increment)
13       start(decrement)
14     Test assertions:
15       ok(value, [message])
16       equal(actual, expected, [message])
17       notEqual(actual, expected, [message])
18       deepEqual(actual, expected, [message])
19       notDeepEqual(actual, expected, [message])
20       strictEqual(actual, expected, [message])
21       notStrictEqual(actual, expected, [message])
22       raises(block, [expected], [message])
23   */
24
25   module('jQuery#awesome', {
26     setup: function() {
27       this.elems = $('#qunit-fixture').children();
28     }
29   });
30
31   test('is chainable', 1, function() {
32     // Not a bad test to run on collection methods.
33     strictEqual(this.elems.awesome(), this.elems, 'should be chaninable');
34   });
35
36   test('is awesome', 1, function() {
37     strictEqual(this.elems.awesome().text(), 'awesomeawesomeawesome', 'should be thoroughly awesome');
38   });
39
40   module('jQuery.awesome');
41
42   test('is awesome', 1, function() {
43     strictEqual($.awesome(), 'awesome', 'should be thoroughly awesome');
44   });
45
46   module(':awesome selector', {
47     setup: function() {
48       this.elems = $('#qunit-fixture').children();
49     }
50   });
51
52   test('is awesome', 1, function() {
53     // Use deepEqual & .get() when comparing jQuery objects.
54     deepEqual(this.elems.filter(':awesome').get(), this.elems.last().get(), 'knows awesome when it sees it');
55   });
56
57 }(jQuery));