public class JsTestCollectorTest {
@Test
public void shouldExecuteJavascript_andCollectTests() throws Exception {
JsTestCollector testCollector = new JsTestCollector();
JsTestRegistry.get().clear();
testCollector.execute(new File(getClass().getResource("/js-tests/simple.test.js").getFile()));
List<GalenTest> tests = testCollector.getCollectedTests();
assertThat("Amount of tests should be", tests.size(), is(3));
assertThat("Name of #1 test should be", tests.get(0).getName(), is("Test number 1"));
assertThat("Name of #1 test should be", tests.get(1).getName(), is("Test number 2"));
assertThat("Name of #1 test should be", tests.get(2).getName(), is("Test number 3"));