@Test public void testFromReader() throws Exception { // Same as stubjslint.js. String jslint = "function JSLINT() {JSLINT.errors=[];return true}"; StringReader reader = new StringReader(jslint); assertJSLintOK(builder.fromReader(reader, "stubjslint.js")); }
@Test public void testFromDefault() throws Exception { assertJSLintOK(builder.fromDefault()); }
@Test public void testFromFile() throws Exception { File f = new File(getClass().getClassLoader().getResource(STUB_JSLINT).toURI()); assertJSLintOK(builder.fromFile(f)); }
@Test public void testFromClasspathResource() throws Exception { assertJSLintOK(builder.fromClasspathResource(STUB_JSLINT)); }