nodejs-runforcover/nodejs-runforcover.spec
2020-08-20 11:34:24 +08:00

43 lines
1.1 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-runforcover
Version: 0.0.2
Release: 1
Summary: Require plugin for JS code coverage
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
License: BSD
URL: https://github.com/chrisdickinson/node-runforcover
Source0: https://registry.npmjs.org/runforcover/-/runforcover-%{version}.tgz
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(bunker)
%endif
%description
Runforcover hooks into the `require()` function and uses nodejs-bunker to
provide code coverage data for your unit test library, whatever it might be.
%prep
%setup -q -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/runforcover
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/runforcover
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%__nodejs test/index.js
%endif
%files
%{nodejs_sitelib}/runforcover
%doc README.markdown
%changelog
* Fri Aug 14 2020 wangyue <wangyue92@huawei.com> - 0.0.2-1
- Package init