!12 Update to 1.2.0
From: @wu-leilei Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
276d506343
@ -1,51 +0,0 @@
|
|||||||
From cab9a8347a302432e8b01474830c5ea81499ba09 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Harband <ljharb@gmail.com>
|
|
||||||
Date: Mon, 17 Aug 2015 21:04:11 -0700
|
|
||||||
Subject: [PATCH] [Tests] Fixing the tests for node 0.12.
|
|
||||||
|
|
||||||
---
|
|
||||||
package.json | 2 +-
|
|
||||||
test/index.js | 15 +++++++++++----
|
|
||||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/package.json b/package.json
|
|
||||||
index b8e1c60..4a6d638 100644
|
|
||||||
--- a/package.json
|
|
||||||
+++ b/package.json
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
- "test": "npm run lint && node --harmony test/index.js && npm run security",
|
|
||||||
+ "test": "npm run lint && node test/index.js && npm run security",
|
|
||||||
"coverage": "covert test/*.js",
|
|
||||||
"coverage-quiet": "covert test/*.js --quiet",
|
|
||||||
"lint": "npm run jscs && npm run eslint",
|
|
||||||
diff --git a/test/index.js b/test/index.js
|
|
||||||
index f40312c..6dbcd81 100644
|
|
||||||
--- a/test/index.js
|
|
||||||
+++ b/test/index.js
|
|
||||||
@@ -21,12 +21,19 @@ test('makeArrowFunction.list() is an array', function (t) {
|
|
||||||
'() => 42',
|
|
||||||
'() => function () {}',
|
|
||||||
'() => x => x * x',
|
|
||||||
- 'x => x * x'
|
|
||||||
+ 'x => x * x',
|
|
||||||
+ 'x => { return x * x; }',
|
|
||||||
+ '(x, y) => { return x + x; }'
|
|
||||||
];
|
|
||||||
+ t.plan(1 + 2 * funcs.length);
|
|
||||||
t.equal(Object.prototype.toString.call(funcs), '[object Array]', 'list() is an array');
|
|
||||||
- for (var i = 0; i < funcs.length; ++i) {
|
|
||||||
- t.equal(typeof funcs[i], 'function', funcs[i] + ' is a function');
|
|
||||||
- t.equal(String(funcs[i]), expectedSources[i], '"' + funcs[i] + '" !== "' + expectedSources[i] + '"');
|
|
||||||
+ if (funcs.length === 0) {
|
|
||||||
+ t.comment('no arrow functions present');
|
|
||||||
+ } else {
|
|
||||||
+ for (var i = 0; i < funcs.length; ++i) {
|
|
||||||
+ t.equal(typeof funcs[i], 'function', funcs[i] + ' is a function');
|
|
||||||
+ t.equal(String(funcs[i]), expectedSources[i], '"' + funcs[i] + '" !== "' + expectedSources[i] + '"');
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
t.end();
|
|
||||||
});
|
|
||||||
@ -1,15 +1,13 @@
|
|||||||
%{?nodejs_find_provides_and_requires}
|
%{?nodejs_find_provides_and_requires}
|
||||||
Name: nodejs-make-arrow-function
|
Name: nodejs-make-arrow-function
|
||||||
Version: 1.1.0
|
Version: 1.2.0
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Function that returns an arbitrary arrow function
|
Summary: Function that returns an arbitrary arrow function
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/ljharb/make-arrow-function
|
URL: https://github.com/ljharb/make-arrow-function
|
||||||
Source0: https://github.com/ljharb/make-arrow-function/archive/v%{version}.tar.gz
|
Source0: https://github.com/ljharb/make-arrow-function/archive/v%{version}.tar.gz
|
||||||
# https://github.com/ljharb/make-arrow-function/pull/1
|
# https://github.com/ljharb/make-arrow-function/pull/1
|
||||||
Source1: nodejs-make-arrow-function-license.txt
|
Source1: nodejs-make-arrow-function-license.txt
|
||||||
# https://github.com/ljharb/make-arrow-function/commit/cab9a8347a302432e8b01474830c5ea81499ba09
|
|
||||||
Patch0: nodejs-make-arrow-function-tests.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
ExclusiveArch: %{nodejs_arches} noarch
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
BuildRequires: nodejs-packaging
|
BuildRequires: nodejs-packaging
|
||||||
@ -41,6 +39,9 @@ cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/make-arrow-function
|
|||||||
%{nodejs_sitelib}/make-arrow-function
|
%{nodejs_sitelib}/make-arrow-function
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 30 2023 wulei <wu_lei@hoperun.com> - 1.2.0-1
|
||||||
|
- Update to 1.2.0
|
||||||
|
|
||||||
* Web 09 Jun 2021 zhaoyao<zhaoyao32@huawei.com> - 1.1.0-2
|
* Web 09 Jun 2021 zhaoyao<zhaoyao32@huawei.com> - 1.1.0-2
|
||||||
- %prep no longer patched with git
|
- %prep no longer patched with git
|
||||||
|
|
||||||
|
|||||||
BIN
v1.1.0.tar.gz
BIN
v1.1.0.tar.gz
Binary file not shown.
BIN
v1.2.0.tar.gz
Normal file
BIN
v1.2.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user