use of com.vaadin.flow.server.frontend.FrontendUtils.FLOW_NPM_PACKAGE_NAME in project flow by vaadin.
the class AbstractNodeUpdateImportsTest method setup.
@Before
public void setup() throws Exception {
File tmpRoot = temporaryFolder.getRoot();
logger = new MockLogger();
frontendDirectory = new File(tmpRoot, DEFAULT_FRONTEND_DIR);
nodeModulesPath = new File(tmpRoot, NODE_MODULES);
generatedPath = new File(tmpRoot, Paths.get(TARGET, DEFAULT_GENERATED_DIR).toString());
importsFile = new File(generatedPath, IMPORTS_NAME);
ClassFinder classFinder = getClassFinder();
updater = new TaskUpdateImports(classFinder, getScanner(classFinder), finder -> null, tmpRoot, generatedPath, frontendDirectory, null, null, false, TARGET, true, false, Mockito.mock(FeatureFlags.class)) {
@Override
Logger log() {
return logger;
}
};
assertTrue(nodeModulesPath.mkdirs());
createExpectedImports(frontendDirectory, nodeModulesPath);
assertTrue(new File(nodeModulesPath, FLOW_NPM_PACKAGE_NAME + "ExampleConnector.js").exists());
}
Aggregations