@Test
public void test() {
SameNameForFunctionAndVariableCheck check = new SameNameForFunctionAndVariableCheck();
SourceFile file = JavaScriptAstScanner.scanSingleFile(new File("src/test/resources/checks/sameNameForFunctionAndVariable.js"), check);
CheckMessagesVerifier.verify(file.getCheckMessages())
.next().atLine(2).withMessage("Refactor the code to avoid using \"fun1\" for both a variable and a function.")
.next().atLine(7).withMessage("Refactor the code to avoid using \"fun2\" for both a variable and a function.")
.next().atLine(14).withMessage("Refactor the code to avoid using \"foo1\" for both a variable and a function.")
.next().atLine(19).withMessage("Refactor the code to avoid using \"foo2\" for both a variable and a function.")
.next().atLine(26).withMessage("Refactor the code to avoid using \"fun4\" for both a variable and a function.")