'Test check_javascript_file_is_safe with JQuery insert to target
functions that take a target as an argument, like appendTo() and
prependTo().'

@data({'template': '        element.parentNode.appendTo(target);', 'rule': None}, {'template': '        test.render().el.appendTo(target);', 'rule': None}, {'template': '        test.render().$el.appendTo(target);', 'rule': None}, {'template': '        test.$element.appendTo(target);', 'rule': None}, {'template': '        test.testEl.appendTo(target);', 'rule': None}, {'template': '$element.appendTo(target);', 'rule': None}, {'template': 'el.appendTo(target);', 'rule': None}, {'template': 'testEl.appendTo(target);', 'rule': None}, {'template': 'testEl.prependTo(target);', 'rule': None}, {'template': 'testEl.insertAfter(target);', 'rule': None}, {'template': 'testEl.insertBefore(target);', 'rule': None}, {'template': 'anycall().appendTo(target)', 'rule': Rules.javascript_jquery_insert_into_target}, {'template': 'anything.appendTo(target)', 'rule': Rules.javascript_jquery_insert_into_target}, {'template': 'anything.prependTo(target)', 'rule': Rules.javascript_jquery_insert_into_target}, {'template': 'anything.insertAfter(target)', 'rule': Rules.javascript_jquery_insert_into_target}, {'template': 'anything.insertBefore(target)', 'rule': Rules.javascript_jquery_insert_into_target})
def test_jquery_insert_to_target(self, data):

    linter = JavaScriptLinter()
    results = FileResults('')
    linter.check_javascript_file_is_safe(data['template'], results)
    self._validate_data_rules(data, results)
