113 Commits

Author SHA1 Message Date
Craig Martin
e0a5cc75ba eliminate shadowed variable declarations
Also, add eslint rule no-shadow to enforce
2016-01-19 12:34:08 -05:00
Jordan Eldredge
37465828d6 Add ESLint warning for quoted keys to tests
I've opted to leave the quotes and associated warnings in the case where the
keys include protected words or integers.
2015-12-18 13:27:48 -08:00
Jordan Eldredge
d91405d54f Enable ESLint rule: 'quotes' for tests
These changes were done automatically by ESLint's `--fix` tag. Thanks ESLint!
2015-12-18 13:27:48 -08:00
Jordan Eldredge
2ae117a7cb Add ESLint rule: key-spacing 2015-12-16 10:00:19 -08:00
Kevin Partington
9c681906a4 Tests: Migrated unit tests to QUnit 2.0 syntax. (fixes #3813) 2015-10-06 23:35:30 -05:00
Garrett Maring
afd2ce8b59 Test for conflicting className/id and attributes 2015-09-17 16:44:36 -07:00
Justin Ridgewell
f4d4557592 Setup DOM for every view test
Karma QUnit v0.1.5 now removes and reinserts the `#qunit-fixture`
element before every test.
2015-08-04 01:13:48 -04:00
Justin Ridgewell
11071babd4 Test #setElement 2015-05-23 20:35:03 -04:00
Justin Ridgewell
00226d5a57 Test #remove returns view 2015-05-23 20:34:55 -04:00
Justin Ridgewell
dcbd0ea8e6 Test #undelegateEvents returns view 2015-05-23 20:34:32 -04:00
Justin Ridgewell
dc52dec96c #undelegate returns view 2015-05-23 20:34:10 -04:00
Justin Ridgewell
fda1f62824 #delegate returns view 2015-05-23 20:33:35 -04:00
Justin Ridgewell
5c8c40fe37 Test #render returns view 2015-05-23 20:33:13 -04:00
Adam Krebs
06f19f45af fix tagName test description 2014-03-23 01:59:42 +02:00
Adam Krebs
c10267db3f view test reorg 2014-03-21 01:44:48 +02:00
Nate Hunzaker
a04d7da6e4 DOM element creation should be overrideable
- Add test for _createElement
- Send tag name to _createElement
2014-03-20 19:34:13 -04:00
Brad Dunbar
72f7da4208 A little clarification.
* Rename #_remove as #_removeElement.
* Add #_setAttributes instead of using #setElement.
* Slim down tests a bit.
* #delegate returns this.
2014-03-14 11:56:16 -04:00
Jimmy Yuen Ho Wong
ad39972d5d Return undefined from delegate 2014-03-14 18:04:18 +08:00
Adam Krebs
f67c7a11c3 test delegate returns listener 2014-03-14 06:35:20 +04:00
Adam Krebs
291f3bcde4 nicer jq test 2014-03-13 12:59:36 +04:00
Adam Krebs
3850d37def add missing semi 2014-03-12 19:55:08 +04:00
Adam Krebs
d99e43b564 test for undelegate with handler and selector, and use an element that exists in the DOM for bubbling 2014-03-12 15:20:40 +04:00
Adam Krebs
d21fd79d8f remove namespace test from custom events test. 2014-03-12 15:16:33 +04:00
Adam Krebs
be11f3a010 add an undelegate method to View and pass back the listener from delegate 2014-03-12 11:07:33 +04:00
Jimmy Yuen Ho Wong
393a209ca8 Merge _remove and remove tests and remove _setEl tests 2014-03-10 21:18:14 +08:00
Jimmy Yuen Ho Wong
b840669fa7 Rename _removeElement to _remove and test _remove for event undelegation 2014-03-10 21:18:13 +08:00
Adam Krebs
c62708f04b use notEqual body isntead of equal null 2014-03-06 15:26:44 +04:00
Adam Krebs
bef78ef496 test setEl and el.parentNode 2014-03-06 15:22:13 +04:00
Adam Krebs
9eff496762 Revert "View conformance tests"
This reverts commit 7eedd4bc0a.

Conflicts:
	test/view.js
2014-03-06 11:14:16 +04:00
Adam Krebs
6d6999976a test _removeElement 2014-03-06 10:46:41 +04:00
Jimmy Yuen Ho Wong
1cb19be4e9 Test for view.remove and view._removeElement 2014-03-05 18:31:13 +08:00
Adam Krebs
81809e188f add global Element guard for IE8 2014-03-04 23:07:28 +02:00
Jimmy Yuen Ho Wong
6cef2f12e5 Check typeof length instead of instanceof 2014-03-04 23:05:11 +02:00
Jimmy Yuen Ho Wong
fca75fb6bd Fix up global in view test 2014-03-04 23:04:59 +02:00
Adam Krebs
0fca38cd82 view test cleanup 2014-03-04 14:45:22 +02:00
Adam Krebs
70933e51cf fix merge conflict 2014-03-04 14:19:35 +02:00
Adam Krebs
a9d066a84e test view.$ interface and rename _createContext to _setEl in view test 2014-03-04 14:17:42 +02:00
Adam Krebs
01f794fe99 Merge remote-tracking branch 'wyuenho/view-native-hooks' into view-native-hooks
Conflicts:
	backbone.js
	test/view.js
2014-03-04 14:15:16 +02:00
Jimmy Yuen Ho Wong
20935c85ee Fix test for fc95eae 2014-03-04 13:42:41 +02:00
Jimmy Yuen Ho Wong
6ebb6e1752 _createContext is side-effect only 2014-03-04 13:42:41 +02:00
Jimmy Yuen Ho Wong
d78fb34aff Prefix all hooks with _ and introduce _undelegate 2014-03-04 13:42:40 +02:00
Jimmy Yuen Ho Wong
5f66f9af18 Rename make to _createContext and have _ensureElement and setElement delegate to it 2014-03-04 13:42:40 +02:00
Adam Krebs
90c36cadac add View#delegate as a single event listener version of delegateEvents for easier overriding 2014-03-04 13:42:40 +02:00
Adam Krebs
0cdb38b03f revert c1e62cda: add View#make back in for overriding 2014-03-04 13:42:40 +02:00
Jimmy Yuen Ho Wong
7eedd4bc0a View conformance tests 2014-03-04 15:00:14 +08:00
Jimmy Yuen Ho Wong
3cef7fa7b6 Fix test for fc95eae 2014-02-22 00:02:37 +08:00
Jimmy Yuen Ho Wong
09d376237b _createContext is side-effect only 2014-02-20 14:18:21 +08:00
Jimmy Yuen Ho Wong
8ab8646361 Prefix all hooks with _ and introduce _undelegate 2014-02-20 05:31:36 +08:00
Jimmy Yuen Ho Wong
33e23df577 Rename make to _createContext and have _ensureElement and setElement delegate to it 2014-02-20 05:11:11 +08:00
Adam Krebs
e9543ee591 add View#delegate as a single event listener version of delegateEvents for easier overriding 2014-02-18 17:34:54 -05:00