def test_setup(node_package): node_package_dir = nodely.NODE_MODULES_DIR / node_package nodely.uninstall(node_package) assert not node_package_dir.exists() zetup.call([sys.executable, 'setup.py', 'develop'], cwd=os.path.dirname(os.path.realpath(__file__))) assert node_package_dir.isdir()
def test_install(node_package): node_package_dir = nodely.NODE_MODULES_DIR / node_package nodely.install(node_package) assert node_package_dir.isdir() nodely.uninstall(node_package) assert not node_package_dir.exists() nodely.install(node_package) assert node_package_dir.isdir()
def test_require_node_modules_from_string(node_package): node_package_dir = nodely.NODE_MODULES_DIR / node_package nodely.uninstall(node_package) assert not node_package_dir.exists() require_node_modules(dist=None, jsmodules=""" {} """.format(node_package)) assert node_package_dir.isdir()
def test_require_node_modules(node_package): node_package_dir = nodely.NODE_MODULES_DIR / node_package nodely.uninstall(node_package) assert not node_package_dir.exists() # HACK: Python 3.5 on Travis CI strangely reports missing coverage require_node_modules( dist=None, jsmodules=[ # pragma: no cover node_package, ]) assert node_package_dir.isdir()
def test_require_node_modules_without_jsmodules(node_package): nodely.uninstall(node_package) node_modules_content = nodely.NODE_MODULES_DIR.listdir() require_node_modules(dist=None) assert node_modules_content == nodely.NODE_MODULES_DIR.listdir()
def test_require_node_modules(node_package): node_package_dir = nodely.NODE_MODULES_DIR / node_package nodely.uninstall(node_package) assert not node_package_dir.exists() require_node_modules(dist=None, jsmodules=[node_package]) assert node_package_dir.isdir()