def test_project_buildall(simpleprj): """Test build all.""" project = WebpackProject(simpleprj) project.buildall() assert exists(join(project.project_path, 'node_modules')) assert exists(join(project.project_path, 'dist/bundle.js'))
def test_project_no_scripts(brokenprj): project = WebpackProject(brokenprj) with pytest.raises(RuntimeError): project.buildall()
def test_project_failed_build(simpleprj): # Remove a file necessary for the build os.unlink(os.path.join(os.path.dirname(simpleprj), 'index.js')) project = WebpackProject(simpleprj) with pytest.raises(RuntimeError): project.buildall()