nodejs-chai/nodejs-chai.spec

40 lines
1.3 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-21 11:09:49 +08:00
Name: nodejs-chai
Version: 3.5.0
Release: 1
Summary: BDD/TDD assertion library for Node.js and the browser
License: MIT
URL: http://chaijs.com
Source0: https://github.com/chaijs/chai/archive/%{version}/nodejs-chai-%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging npm(mocha) npm(assertion-error) npm(deep-eql)
Patch0001: fix-tests-on-nodejs65.patch
%description
Chai is a BDD / TDD assertion library for node and the browser that
can be delightfully paired with any JavaScript testing framework.
%prep
%setup -q -n chai-%{version}
%patch0001 -p1
%nodejs_fixdep type-detect "^2.0.0"
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/chai
cp -r package.json index.js chai.js lib %{buildroot}/%{nodejs_sitelib}/chai
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha --require ./test/bootstrap --reporter dot --ui tdd test/*.js
%files
%doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md History.md ReleaseNotes.md
%{nodejs_sitelib}/chai
%changelog
* Mon Aug 17 2020 Shaoqiang Kang <kangshaoqiang1@huawei.com> - 3.5.0-1
- Package init