%global enable_tests 0 %global srcname lolex Name: nodejs-%{srcname} Version: 1.3.2 Release: 1 Summary: Fake JavaScript timers License: BSD URL: https://github.com/sinonjs/lolex Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(referee) npm(sinon) %endif %description JavaScript implementation of the timer APIs; setTimeout, clearTimeout, setImmediate, clearImmediate, setInterval, clearInterval, and requestAnimationFrame, along with a clock instance that controls the flow of time. Lolex also provides a Date implementation that gets its time from the clock. %prep %setup -q -n package %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json src/ \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check npm run test-node %endif %files %doc Readme.md %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Thu Aug 20 2020 yaokai - 1.3.2-1 - Package init