'Test check_javascript_file_is_safe with JQuery insertion functions
other than append(), prepend() and html() that take content as an
argument (e.g. before(), after()).'

@data({'template': 'test.unwrap(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.wrap(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.wrapAll(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.wrapInner(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.after(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.before(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.replaceAll(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.replaceWith(HtmlUtils.ensureHtml(htmlSnippet).toString())', 'rule': None}, {'template': 'test.replaceWith(edx.HtmlUtils.HTML(htmlString).toString())', 'rule': None}, {'template': 'test.unwrap(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.wrap(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.wrapAll(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.wrapInner(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.after(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.before(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.replaceAll(anything)', 'rule': Rules.javascript_jquery_insertion}, {'template': 'test.replaceWith(anything)', 'rule': Rules.javascript_jquery_insertion})
def test_jquery_insertion(self, data):

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