nodejs-test/nodejs-test.spec
2021-06-16 15:13:20 +08:00

56 lines
1.4 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 1
%global srcname test
%global owner gozala
Name: nodejs-%{srcname}
Version: 0.6.0
Release: 3
Summary: (Un)CommonJS test runner
License: MIT
URL: https://github.com/Gozala/test-commonjs
Source0: https://github.com/Gozala/test-commonjs/archive/v%{version}.tar.gz
Patch0000: Fix-AssertionError-detection-for-node.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: nodejs-ansi-font
%endif
%description
%{summary}.
%prep
%autosetup -n test-commonjs-%{version} -p1
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json *.js \
%{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} ./test/index.js
%endif
%files
%{!?_licensedir:%global license %doc}
%doc History.md Readme.md
%license License.md
%{nodejs_sitelib}/%{srcname}
%changelog
* Web 09 Jun 2021 zhaoyao<zhaoyao32@huawei.com> - 0.6.0-3
- %prep no longer patched with git
* Wed Sep 16 2020 leiju <leiju4@huawei.com> - 0.6.0-2
- Fix AssertionError detection for node
* Tue Aug 11 2020 wutao <wutao61@huawei.com> - 0.6.0-1
- package init