b9c44a8
%{?nodejs_find_provides_and_requires}
b9c44a8
b9c44a8
%global enable_tests 1
b9c44a8
b9c44a8
Name:       nodejs-expect-dot-js
b9c44a8
Version:    0.2.0
173c102
Release:    14%{?dist}
b9c44a8
Summary:    Behavior-driven development (BDD) style assertions for Node.js and the browser
b9c44a8
# License text is included in README.md
b9c44a8
License:    MIT
b9c44a8
URL:        https://npmjs.org/package/expect.js
b9c44a8
Source0:    http://registry.npmjs.org/expect.js/-/expect.js-%{version}.tgz
b9c44a8
# Source1 is generated by running Source10, which pulls from the upstream
b9c44a8
# revision control repository.
b9c44a8
Source1:    tests-0.2.0.tar.bz2
b9c44a8
Source10:   dl-tests.sh
b9c44a8
b9c44a8
BuildArch:  noarch
b9c44a8
%if 0%{?fedora} >= 19
b9c44a8
ExclusiveArch: %{nodejs_arches} noarch
b9c44a8
%else
b9c44a8
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
b9c44a8
%endif
b9c44a8
b9c44a8
# 2 of the tests fail but have been fixed in upstream master.
b9c44a8
# Cherry-pick the commits that fix this issue, but wait for the next
b9c44a8
# upstream release to pull in the other changes.
b9c44a8
Patch0:     %{name}-0.2.0-Pass-.fail-unit-test.patch
b9c44a8
Patch1:     %{name}-0.2.0-Add-actual-expected-property-to-the-thrown-error.patch
b9c44a8
b9c44a8
BuildRequires:  nodejs-packaging
b9c44a8
b9c44a8
%if 0%{?enable_tests}
b9c44a8
BuildRequires:  npm(mocha)
b9c44a8
%endif
b9c44a8
db408da
Patch2: 0001-Update-expected-test-values.patch
db408da
b9c44a8
%description
b9c44a8
%{summary}.
b9c44a8
b9c44a8
b9c44a8
%prep
b9c44a8
%setup -q -n package
b9c44a8
%setup -q -D -T -a 1 -n package
b9c44a8
%patch0 -p1
b9c44a8
%patch1 -p1
db408da
%patch2 -p1
b9c44a8
b9c44a8
b9c44a8
%build
b9c44a8
#nothing to do
b9c44a8
b9c44a8
b9c44a8
%install
b9c44a8
mkdir -p %{buildroot}%{nodejs_sitelib}/expect.js
b9c44a8
cp -pr package.json expect.js \
b9c44a8
    %{buildroot}%{nodejs_sitelib}/expect.js
b9c44a8
b9c44a8
%nodejs_symlink_deps
b9c44a8
b9c44a8
b9c44a8
%if 0%{?enable_tests}
b9c44a8
%check
b9c44a8
%nodejs_symlink_deps --check
b9c44a8
%{nodejs_sitelib}/mocha/bin/mocha --require ./test/common \
b9c44a8
    --reporter dot --growl test/expect.js
b9c44a8
%endif
b9c44a8
b9c44a8
b9c44a8
%files
b9c44a8
%doc History.md README.md
b9c44a8
%{nodejs_sitelib}/expect.js
b9c44a8
b9c44a8
b9c44a8
%changelog
173c102
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-14
173c102
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
173c102
13cfe02
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-13
13cfe02
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
13cfe02
d9bbb50
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-12
d9bbb50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d9bbb50
952f868
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-11
952f868
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
952f868
db408da
* Mon Dec 05 2016 Stephen Gallagher <sgallagh@redhat.com> - 0.2.0-10
db408da
- Update expected output for anonItThrows and anonItWorks tests
db408da
5994fdd
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-9
5994fdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5994fdd
838df9e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-8
838df9e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
838df9e
70df89c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-7
70df89c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
70df89c
77fb73a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-6
77fb73a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
77fb73a
b9c44a8
* Thu Jul 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-5
b9c44a8
- add ExclusiveArch macro
b9c44a8
- use "nodejs_symlink_deps --check"
b9c44a8
b9c44a8
* Thu Jun 20 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-4
b9c44a8
- rename from nodejs-expect-js to nodejs-expect-dot-js
b9c44a8
- add %%check, including patches to fix failing tests
b9c44a8
b9c44a8
* Sat May 25 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-3
b9c44a8
- fix name of spec file
b9c44a8
b9c44a8
* Sat Mar 02 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-2
b9c44a8
- amend typo in the summary
b9c44a8
b9c44a8
* Thu Feb 14 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-1
b9c44a8
- initial package