%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-expect-dot-js
Version: 0.2.0
Release: 14%{?dist}
Summary: Behavior-driven development (BDD) style assertions for Node.js and the browser
# License text is included in README.md
License: MIT
URL: https://npmjs.org/package/expect.js
Source0: http://registry.npmjs.org/expect.js/-/expect.js-%{version}.tgz
# Source1 is generated by running Source10, which pulls from the upstream
# revision control repository.
Source1: tests-0.2.0.tar.bz2
Source10: dl-tests.sh
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
# 2 of the tests fail but have been fixed in upstream master.
# Cherry-pick the commits that fix this issue, but wait for the next
# upstream release to pull in the other changes.
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
%setup -q -n package
%setup -q -D -T -a 1 -n package
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
#nothing to do
%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
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 05 2016 Stephen Gallagher <sgallagh@redhat.com> - 0.2.0-10
- Update expected output for anonItThrows and anonItWorks tests
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Jul 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-5
- add ExclusiveArch macro
- use "nodejs_symlink_deps --check"
* Thu Jun 20 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-4
- rename from nodejs-expect-js to nodejs-expect-dot-js
- add %%check, including patches to fix failing tests
* Sat May 25 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-3
- fix name of spec file
* Sat Mar 02 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-2
- amend typo in the summary
* Thu Feb 14 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-1
- initial package