From 0adf8e721be453a203ac556264697bff9552d729 Mon Sep 17 00:00:00 2001 From: Jared K. Smith Date: Aug 20 2017 17:37:17 +0000 Subject: Fix tests and Provides --- diff --git a/nodejs-esprima-fb.spec b/nodejs-esprima-fb.spec index b3aa32e..cda4493 100644 --- a/nodejs-esprima-fb.spec +++ b/nodejs-esprima-fb.spec @@ -1,20 +1,27 @@ # json-diff is not yet in Fedora -%global enable_tests 0 +%global enable_tests 1 %global module_name esprima-fb Name: nodejs-%{module_name} Version: 15001.1.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Facebook-specific fork of the esprima project License: BSD URL: https://github.com/facebook/esprima -Source0: http://registry.npmjs.org/%{module_name}/-/%{module_name}-15001.1.0-dev-harmony-fb.tgz +Source0: http://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}-dev-harmony-fb.tgz Source1: http://github.com/facebook/esprima/raw/master/LICENSE.BSD +Source2: https://raw.githubusercontent.com/facebookarchive/esprima/fb-harmony/test/harmonytest.js +Source3: https://raw.githubusercontent.com/facebookarchive/esprima/fb-harmony/test/fbtest.rec.js +Source4: https://raw.githubusercontent.com/facebookarchive/esprima/fb-harmony/test/harmonymodulestest.js BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging +%if 0%{?enable_tests} +BuildRequires: npm(json-diff) +%endif +Provides: npm(esprima-fb) = %{version} %description Esprima (esprima.org, BSD license) is a high performance, standard-compliant @@ -26,6 +33,9 @@ specification on top of ECMAScript syntax. %prep %setup -q -n package cp -p %{SOURCE1} . +cp -p %{SOURCE2} test/ +cp -p %{SOURCE3} test/ +cp -p %{SOURCE4} test/ rm -rf node_modules @@ -43,11 +53,11 @@ ln -s %{nodejs_sitelib}/%{module_name}/bin/esvalidate.js %{buildroot}%{_bindir}/ %nodejs_symlink_deps -%if 0%{?enable_tests} %check +%nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} node test/run.js -%nodejs_symlink_deps --check %endif %files @@ -58,6 +68,10 @@ node test/run.js %{nodejs_sitelib}/%{module_name} %changelog +* Sun Aug 20 2017 Jared Smith - 15001.1.0-8 +- Enable tests, now that npm(json-diff) is in Fedora +- Manually add proper "Provides" + * Wed Jul 26 2017 Fedora Release Engineering - 15001.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild