def test_js_hint_set_defined_name(): assert len( validate_js.jshint_js(code_fragment_to_js("defined_name()"), ["defined_name"]).errors) == 0
def test_js_hint_error_on_undefined_name(): assert len( validate_js.jshint_js( code_fragment_to_js("undefined_name()")).errors) == 1
def test_js_hint_warn_on_es6(): assert len( validate_js.jshint_js(code_fragment_to_js("((() => 4)())"), []).errors) == 1
def test_set_defined_name(self): self.assertEquals( len( jshint_js(code_fragment_to_js("defined_name()"), ["defined_name"]).errors), 0)
def test_error_on_undefined_name(self): self.assertEquals( len(jshint_js(code_fragment_to_js("undefined_name()")).errors), 1)
def test_warn_on_es6(self): self.assertEquals( len(jshint_js(code_fragment_to_js("((() => 4)())"), []).errors), 1)