51 lines
1.4 KiB
RPMSpec
51 lines
1.4 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
Name: nodejs-expect-dot-js
|
|
Version: 0.2.0
|
|
Release: 2
|
|
Summary: Behavior-driven development (BDD) style assertions for Node.js and the browser
|
|
License: MIT
|
|
URL: https://github.com/Automattic/expect.js
|
|
Source0: https://github.com/Automattic/expect.js/archive/%{version}.tar.gz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
Patch0: %{name}-0.2.0-Pass-.fail-unit-test.patch
|
|
Patch1: %{name}-0.2.0-Add-actual-expected-property-to-the-thrown-error.patch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(mocha)
|
|
%endif
|
|
Patch2: 0001-Update-expected-test-values.patch
|
|
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%autosetup -n expect.js-%{version} -p1
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/expect.js
|
|
cp -pr package.json expect.js \
|
|
%{buildroot}%{nodejs_sitelib}/expect.js
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{nodejs_sitelib}/mocha/bin/mocha --require ./test/common \
|
|
--reporter dot --growl test/expect.js
|
|
%endif
|
|
|
|
%files
|
|
%doc History.md README.md
|
|
%{nodejs_sitelib}/expect.js
|
|
|
|
%changelog
|
|
* Web 09 Jun 2021 zhaoyao<zhaoyao32@huawei.com> - 0.2.0-2
|
|
- %prep no longer patched with git
|
|
|
|
* Fri Aug 21 2020 leiju <leiju4@huawei.com> - 0.2.0-1
|
|
- Package init
|