commit
f000bbb37d
28
0001-Fix-tests-for-Node.js-6.5.patch
Normal file
28
0001-Fix-tests-for-Node.js-6.5.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 004b6f092c96696dde28027553dc3d6c6e1e894e Mon Sep 17 00:00:00 2001
|
||||
Date: Tue, 6 Dec 2016 12:30:04 -0500
|
||||
Subject: [PATCH] Fix tests for Node.js 6.5+
|
||||
|
||||
---
|
||||
tests/test.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test.js b/tests/test.js
|
||||
index ab2708a34eddef5b7f2091a0f3d6c91974c15b7c..239589ef5a2ceef2224a9bcab951350bac3e70ba 100644
|
||||
--- a/tests/test.js
|
||||
+++ b/tests/test.js
|
||||
@@ -69,11 +69,11 @@ function fff() {
|
||||
}
|
||||
|
||||
it('should format function', function() {
|
||||
var f = function() {
|
||||
};
|
||||
- assert.equal(format(f), 'Function { name: \'\' }');
|
||||
+ assert.equal(format(f), 'Function { name: \'f\' }');
|
||||
|
||||
assert.equal(format(fff), 'Function { name: \'fff\' }');
|
||||
|
||||
//TODO add test for arrow function
|
||||
});
|
||||
--
|
||||
2.9.3
|
||||
|
||||
40
nodejs-should-format.spec
Normal file
40
nodejs-should-format.spec
Normal file
@ -0,0 +1,40 @@
|
||||
Name: nodejs-should-format
|
||||
Version: 0.3.2
|
||||
Release: 1
|
||||
Summary: Formatting of objects for should.js
|
||||
License: MIT
|
||||
URL: https://github.com/shouldjs/format
|
||||
Source0: https://registry.npmjs.org/should-format/-/should-format-%{version}.tgz
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
BuildRequires: npm(mocha) npm(should-type)
|
||||
Patch0001: 0001-Fix-tests-for-Node.js-6.5.patch
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n package
|
||||
%patch0001 -p1
|
||||
sed -i 's/\r$//' README.md
|
||||
rm -rf node_modules
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/should-format
|
||||
cp -pr package.json index.js util.js %{buildroot}%{nodejs_sitelib}/should-format
|
||||
%nodejs_symlink_deps
|
||||
|
||||
%check
|
||||
%nodejs_symlink_deps --check
|
||||
%{nodejs_sitelib}/mocha/bin/mocha --ui bdd tests/test.js
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{nodejs_sitelib}/should-format
|
||||
|
||||
%changelog
|
||||
* Wed Aug 12 2020 wangyue <wangyue92@huawei.com> - 0.3.2-1
|
||||
- package init
|
||||
5
nodejs-should-format.yaml
Normal file
5
nodejs-should-format.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/shouldjs/format
|
||||
version_control: github
|
||||
src_repo: shouldjs/format
|
||||
tag_prefix: "^"
|
||||
seperator: "."
|
||||
BIN
should-format-0.3.2.tgz
Normal file
BIN
should-format-0.3.2.tgz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user