Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit ec8ca70

Browse files
committed
replaced micro-selector with qwery
1 parent 842a3b5 commit ec8ca70

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "assets/qunit"]
22
path = assets/qunit
33
url = https://github.com/jquery/qunit.git
4-
[submodule "assets/micro-selector"]
5-
path = assets/micro-selector
6-
url = https://github.com/fabiomcosta/micro-selector.git
4+
[submodule "assets/qwery"]
5+
path = assets/qwery
6+
url = https://github.com/ded/qwery.git

assets/micro-selector

-1
This file was deleted.

assets/qwery

Submodule qwery added at f7b7ce6

test/test.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div id="qunit-fixture"></div>
1111

1212
<script src="../assets/qunit/qunit/qunit.js"></script>
13-
<script src="../assets/micro-selector/dist/uSelector.js"></script>
13+
<script src="../assets/qwery/qwery.min.js"></script>
1414
<script src="../src/zenjungle.js"></script>
1515
<script src="test.js"></script>
1616
</body>

test/test.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var fixture = $u('#qunit-fixture').pop();
1+
var fixture = qwery('#qunit-fixture').pop();
22

33
module('non-zen');
44
test('check basic append', function() {
@@ -8,7 +8,7 @@ test('check basic append', function() {
88
['span', 'Lorem ipsum']
99
]));
1010

11-
element = $u('span', fixture).pop();
11+
element = qwery('span', fixture).pop();
1212

1313
equal('SPAN', element.tagName, 'element is span')
1414
equal('Lorem ipsum', element.innerHTML, 'element inner HTML equals "Lorem ipsum"');
@@ -24,7 +24,7 @@ test('check append with properties', function() {
2424
}]
2525
]))
2626

27-
element = $u('div', fixture).pop();
27+
element = qwery('div', fixture).pop();
2828

2929
equal('test-class', element.className, 'element class equals "test-class"');
3030
equal('test-id', element.id, 'element id equals "test-id"');
@@ -44,11 +44,11 @@ test('check nested elements', function() {
4444
]]
4545
]));
4646

47-
equal(true, $u('div > ul', fixture).length, 'UL is DIVs direct child');
48-
equal(true, $u('div > span', fixture).length, 'SPAN is DIVs direct child');
49-
equal(false, $u('div > li').length, 'LIs are not direct childs of DIV')
50-
equal(4, $u('div > ul > li', fixture).length, 'list has 4 elements');
51-
equal('test', $u('li', fixture)[2].className, 'third LI has class');
47+
equal(true, qwery('div > ul', fixture).length, 'UL is DIVs direct child');
48+
equal(true, qwery('div > span', fixture).length, 'SPAN is DIVs direct child');
49+
equal(false, qwery('div > li').length, 'LIs are not direct childs of DIV')
50+
equal(4, qwery('div > ul > li', fixture).length, 'list has 4 elements');
51+
equal('test', qwery('li', fixture)[2].className, 'third LI has class');
5252
});
5353

5454
test('DOM elements mixin', function() {
@@ -59,7 +59,7 @@ test('DOM elements mixin', function() {
5959
]]
6060
]));
6161

62-
equal(1, $u('div > span', fixture).length);
62+
equal(1, qwery('div > span', fixture).length);
6363
});
6464

6565
test('zenjungle mixins', function() {
@@ -72,7 +72,7 @@ test('zenjungle mixins', function() {
7272
]]
7373
]));
7474

75-
equal(1, $u('div > span', fixture).length);
75+
equal(1, qwery('div > span', fixture).length);
7676
});
7777

7878
module('zen');
@@ -82,7 +82,7 @@ test('check element class', function() {
8282
['div.test']
8383
]));
8484

85-
equal('test', $u('div', fixture)[0].className);
85+
equal('test', qwery('div', fixture)[0].className);
8686
});
8787

8888
test('check element id', function() {
@@ -91,7 +91,7 @@ test('check element id', function() {
9191
['div#test']
9292
]));
9393

94-
equal('test', $u('div', fixture)[0].id);
94+
equal('test', qwery('div', fixture)[0].id);
9595
});
9696

9797
test('check attributes', function() {
@@ -100,8 +100,8 @@ test('check attributes', function() {
100100
['a[href=#fragment][class=test]']
101101
]));
102102

103-
equal('fragment', $u('a', fixture)[0].href.split('#')[1]);
104-
equal('test', $u('a', fixture)[0].className);
103+
equal('fragment', qwery('a', fixture)[0].href.split('#')[1]);
104+
equal('test', qwery('a', fixture)[0].className);
105105
});
106106

107107
test('mixed properties #1', function() {
@@ -111,7 +111,7 @@ test('mixed properties #1', function() {
111111
['input#id.class[type=text][value=some-text]']
112112
]));
113113

114-
element = $u('input', fixture)[0];
114+
element = qwery('input', fixture)[0];
115115

116116
equal('class', element.className, 'class name equals "class"');
117117
equal('id', element.id, 'id equals "id"');
@@ -126,7 +126,7 @@ test('mixed properties #2', function() {
126126
['input.class[type=text]#id[value=some-text]']
127127
]));
128128

129-
element = $u('input', fixture)[0];
129+
element = qwery('input', fixture)[0];
130130

131131
equal('class', element.className, 'class name equals "class"');
132132
equal('id', element.id, 'id equals "id"');

0 commit comments

Comments
 (0)