googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 61 forks source link

tests/template_element.js NestedRepeatDeletionOfMultipleSubTemplates tests anything? #134

Closed kevmoo closed 10 years ago

kevmoo commented 11 years ago

repaet is spelled wrong. No asserts.

  test('NestedRepeatDeletionOfMultipleSubTemplates', function() {
    var div = createTestHtml(
        '<ul>' +
          '<template repeat="{{}}" id=t1>' +
            '<li>{{name}}' +
              '<ul>' +
                '<template ref=t1 repaet="{{items}}"></template>' +
              '</ul>' +
            '</li>' +
          '</template>' +
        '</ul>');

    var m = [
      {
        name: 'Item 1',
        items: [
          {
            name: 'Item 1.1'
          }
        ]
      }
    ];

    recursivelySetTemplateModel(div, m);

    Platform.performMicrotaskCheckpoint();
    m.splice(0, 1);
    Platform.performMicrotaskCheckpoint();
  });
rafaelw commented 10 years ago

If memory serves, this was testing a "crash" (probably null dereference). Fixed the "repaet" and added asserts. Thanks!

https://github.com/Polymer/TemplateBinding/commit/88bdc50021671e59d27c321c05d18043938ed02f