!1 package init

Merge pull request !1 from wang_yue111/master
This commit is contained in:
openeuler-ci-bot 2020-08-21 00:04:28 +08:00 committed by Gitee
commit f000bbb37d
4 changed files with 73 additions and 0 deletions

View 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
View 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

View 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

Binary file not shown.