Commit Graph

150 Commits

Author SHA1 Message Date
Evan You bf73f08a8a unit test for utils.bind() 2013-11-18 16:32:02 -05:00
Evan You 91ba244300 no longer need bind.js shim 2013-11-18 15:46:29 -05:00
Evan You 6204f8bf0f use simple bind instead of native bind, remove vm.$get() 2013-11-18 15:38:15 -05:00
Evan You b4902ae757 unit test for new exp-parser implementation 2013-11-18 15:15:11 -05:00
Evan You 23bd49fa08 only emit get events during deps parsing - improves perf 2013-11-17 23:54:39 -05:00
Evan You 7888d05dc1 Tests
- unit tests for Observer:
  - unobserve()
  - ensurePath()
  - ensurePaths()
  - Multiple observers
- unit test for sd-model:
  - should only lock update if it has no filters
- functional test for sd-model in validation.js:
  - should remember and restore selection position
    when it has filters
- functional test for Observer.ensurePaths():
  - should allow setting a nested scope object to {}
2013-11-17 20:08:20 -05:00
Evan You a8e12f8ccd Firebase example + bug fixes
- move ensurePath() to Observer.js
- add Observer.ensurePaths(), which deals with the situation
  when a scope object with nested values is given a new value
  with incomplete nested structure. e.g. this.val = {}
- fix Directive argument regex
- sd-model: no longer locks during set() so filters work on
  input fields
- sd-repeat: handles undefined update, also fix transition
- utils.attr now takes additional `noRemove` argument
- ViewModel.$emit now also triggers event on itself
2013-11-17 02:04:29 -05:00
Evan You 88ebff6655 split multiple expressions by unquoted commas 2013-11-16 01:30:39 -05:00
Evan You bb7300ded4 functional test for routing 2013-11-15 13:59:00 -05:00
Evan You f584c844b7 travis 2013-11-15 13:26:35 -05:00
Evan You 15d54e9fdc - add functional test for validation using filters
- filter functions now have a `this` context of the VM calling it.
2013-11-15 13:14:38 -05:00
Evan You 1270139b55 transition classes now defaults to sd-enter and sd-leave, also configurable. 2013-11-15 12:43:21 -05:00
Evan You a617315549 unit test for utils.split 2013-11-15 11:50:25 -05:00
Evan You 30784b5756 expressions
- add functional test case for sd-on expression handlers
- invalid inline expressions: the error will be captured and warning thrown
- add unit test case for invalid inline expressions
- utils.warn() now always gets thrown by default
- add `silent` config option to suppress warnings
2013-11-15 11:46:24 -05:00
Evan You f87f603d03 computed properties now use $get and $set to be more explicit 2013-11-15 11:06:11 -05:00
Evan You a7d184e44f transition class can take format of "enter,leave" 2013-11-15 00:22:17 -05:00
Evan You 3dc6089b7f unit test for utils.attr() 2013-11-14 13:12:34 -05:00
Evan You 2c0d8a490b utils.attr()
A method that access an attribute on a node, removes that attribute
and returns the value. Makes code a bit shorter and reduces the need to
explicitly remove attributes.
2013-11-14 13:04:28 -05:00
Evan You ee36feac09 utils.processOptions()
merge utils.convertPartials & utils.convertComponents into one function
so it's cleaner in both main.js and compiler.js. Also removed some redundancy
for processing options.template.
2013-11-14 11:36:50 -05:00
Evan You 5ad8edeb08 change sd-viewmodel to sd-component, allow direct use of Objects in Seed.component() 2013-11-13 21:51:51 -05:00
Evan You 09377185ce functional tests for transition 2013-11-13 17:43:31 -05:00
Evan You a740802330 unit tests for transitions 2013-11-12 13:45:54 -05:00
Evan You cfb1e664ac resolve rebase conflicts for updatePrefix() 2013-11-11 18:07:10 -05:00
Evan You 388dd84a6f fix bugs for todomvc (sd-if + sd-repeat) 2013-11-05 14:57:30 -05:00
Evan You db284ffa94 move $index to VM instead of item, add $parent & $collection 2013-11-04 12:55:13 -05:00
Evan You 5ffa301467 add teardown option; tests for $destroy() 2013-11-02 22:19:52 -04:00
Evan You f4d42cc62b add code coverage for unit tests 2013-10-30 17:40:58 -04:00
Evan You 18530c7ff2 functional test for todomvc 2013-10-28 20:59:18 -04:00
Evan You 7a0bdc9971 functional tests + fix $index binding 2013-10-28 13:22:16 -04:00
Evan You 495d799c3d functional tests for forms and encapsulation 2013-10-25 18:22:22 -04:00
Evan You be72b739c5 child VMs should remove itself from parent's $ when destroyed 2013-10-25 13:40:36 -04:00
Evan You d191ce3062 tests for templateToFragment and convertPartials 2013-10-25 11:28:51 -04:00
Evan You c83ce1e4a8 start test for todomvc 2013-10-24 20:00:59 -04:00
Evan You c133e4a9c1 test for simple directive 2013-10-24 19:44:02 -04:00
Evan You 8104056d27 functional tests for template and expression 2013-10-24 19:33:19 -04:00
Evan You 186b63227d hint and test pass 2013-10-24 00:45:21 -04:00
Evan You 84010129e2 test for utils 2013-10-24 00:30:45 -04:00
Evan You 412873f5d8 restructure for functional tests, use CasperJS 2013-10-23 18:19:23 -04:00
Evan You db22a2a023 fix dependency tracking for nested values 2013-10-21 14:17:20 -04:00
Evan You fa2907372c tests for sd-id 2013-10-19 01:21:49 -04:00
Evan You 094a1feca1 simple no-data directive 2013-10-19 00:34:34 -04:00
Evan You 318df39dc4 rename Seed.vm -> Seed.viewmodel 2013-10-18 12:40:50 -04:00
Evan You 2473d78706 remove unecessary nulling, change comment style 2013-10-18 12:03:11 -04:00
Evan You 70a3d93bed ViewModel.$once 2013-10-17 12:19:58 -04:00
Evan You af342b75c0 remove context binding related stuff 2013-10-17 11:30:35 -04:00
Evan You f100882685 include test dependencies 2013-10-13 14:51:48 -04:00
Evan You 160ddb599a all unit tests pass in IE9 2013-10-13 14:02:19 -04:00
Evan You b2c4882fda remove option to change interpolate tags 2013-10-13 02:37:08 -04:00
Evan You 7b17f80eee IE9 compatibility
- fixed: Array method wrapping
- fixed: console
- fixed: classList polyfiil
- fixed: select options
2013-10-13 02:15:52 -04:00
Evan You b121a00a95 add sd-pre 2013-10-12 21:37:22 -04:00
Evan You c1206f89b3 tests for lazy option 2013-10-12 20:32:21 -04:00
Evan You b8781c54eb sd-model 2013-10-12 20:10:16 -04:00
Evan You 345724a1e6 fix bug from last commit 2013-10-12 14:19:27 -04:00
Evan You 99b25b2998 rename `prop` option to `scope` 2013-10-11 18:24:53 -04:00
Evan You 65faa95549 move all API methods to Seed 2013-10-11 18:13:57 -04:00
Evan You 9405ed720f rename `props` options to `proto` 2013-10-11 17:46:28 -04:00
Evan You 3159c9a930 fix sd-repeat pop/shift/splice on empty array 2013-10-11 17:40:39 -04:00
Evan You 3cb7d1a00c rename sd-each to sd-repeat 2013-10-11 17:27:36 -04:00
Evan You f1179ace81 tests for $ event methods 2013-10-08 23:19:12 -04:00
Evan You a21e8907d1 implement $ event methods, optimize for minification 2013-10-08 22:26:25 -04:00
Evan You 3cbf498d5a partials done. 2013-10-08 17:22:48 -04:00
Evan You 1e827e87aa compiler clean up, vm & partial API, jshint test files 2013-10-08 01:14:40 -04:00
Evan You 2232cf2885 $index for each items 2013-10-07 02:03:43 -04:00
Evan You dbcd78f9b6 fix: each options should be mixed into compiler instance 2013-10-07 01:31:16 -04:00
Evan You ec86b9faf9 ViewModel.extend() should also extend Object options 2013-10-06 23:24:48 -04:00
Evan You eef0dc6ad1 private directives and filters 2013-10-03 18:07:01 -04:00
Evan You 9297042b2d directive interface change 2013-10-03 12:09:20 -04:00
Evan You 8a9419241e new init/extend options API 2013-10-03 11:49:48 -04:00
Evan You 4003fe2b07 implement new API per spec 2013-10-02 18:14:29 -04:00
Evan You 4209e27260 sd-if and minor fixes 2013-10-02 15:20:57 -04:00
Evan You ad0cb67409 directives unit tests except for sd-if 2013-10-01 17:57:17 -04:00
Evan You 0fdd0cef0e fix test mock keyevent 2013-09-30 23:25:13 -04:00
Evan You 0c250936b5 unit tests for directives (WIP) 2013-09-30 18:21:35 -04:00
Evan You 949e6e1521 template changes again + allow further extend() for VMs 2013-09-30 16:22:16 -04:00
Evan You 5ff47a83dd fix observer mechanism 2013-09-30 14:15:26 -04:00
Evan You 0f6e719eb0 unit tests for filters 2013-09-26 13:44:31 -07:00
Evan You c94ff6b033 simplify template API 2013-09-25 23:50:09 -07:00
Evan You 7eec161a73 unit tests for viewmodel 2013-09-10 18:57:47 -04:00
Evan You 00114112a1 unit test for API (src/main.js) 2013-09-10 18:16:09 -04:00
Evan You 206e3bce64 test structure changes 2013-09-09 18:04:33 -04:00
Evan You 737484e4a7 put all unit tests in one file 2013-09-09 10:25:27 -04:00
Evan You 6bc19e6e66 make all unit tests run in real browsers 2013-09-08 01:21:41 -04:00
Evan You e487cf7e2f unit test for array observing 2013-09-05 00:56:54 -04:00
Evan You 8c09159da4 unit test - observer - array - scaffold 2013-09-04 11:40:32 -04:00
Evan You 7a39637cde unit test for Observer.observe - Objects only 2013-09-03 16:19:03 -04:00
Evan You 1c85e86297 unit test for TextParser 2013-08-29 15:41:07 -04:00
Evan You 2433a3a69c unit test for Dependency Parser's internal methods 2013-08-29 13:19:22 -04:00
Evan You d80b5ffef6 unit test for Expression Parser 2013-08-29 12:50:57 -04:00
Evan You 5f72cabe5c deps-parser cannot be tested alone 2013-08-29 11:00:12 -04:00
Evan You 7fdb1b25a7 use strictEqual 2013-08-28 22:46:13 -04:00
Evan You 5685f6853a fix directive test 2013-08-28 22:19:58 -04:00
Evan You b23c790fbe unit tests for directive.js 2013-08-28 18:33:06 -04:00
Evan You df212574fd unit tests for binding.js 2013-08-28 14:18:03 -04:00
Evan You 498778ec23 0.3.2 - make it actually work for Browserify 2013-08-26 23:02:35 -04:00
Evan You c6903e0074 get ready for tests 2013-08-26 19:28:03 -04:00
Evan You 5acc8a2986 computed properties!!! 2013-08-06 18:29:22 -04:00
Evan You 23a2bde889 big refactor.. again 2013-08-02 14:31:15 -04:00
Evan You a5e27b1174 naive implementation 2013-07-28 23:23:56 -04:00
Evan You 871ed91266 rename 2013-07-28 12:35:03 -04:00
Evan You 83fac017f9 initial setup 2013-07-27 17:04:21 -04:00