Fix build failure

This commit is contained in:
lei_ju 2020-09-16 17:39:25 +08:00
parent b729e4b9ec
commit 7297359ecc
2 changed files with 36 additions and 5 deletions

View File

@ -0,0 +1,28 @@
commit 9abb0ed84e54ac6fa5f7b9af2b9ebb09a0723753
Author: Tom Hughes <tom@compton.nu>
Date: Fri May 10 22:33:11 2019 +0100
Fix tests for changes in assert
diff --git a/test/jar_serialization_test.js b/test/jar_serialization_test.js
index 51865cb..3a6687c 100644
--- a/test/jar_serialization_test.js
+++ b/test/jar_serialization_test.js
@@ -185,7 +185,7 @@ vows
"Cannot call toJSON": function(jar) {
assert.throws(function() {
jar.toJSON();
- }, 'getAllCookies is not implemented (therefore jar cannot be serialized)');
+ }, Error('getAllCookies is not implemented (therefore jar cannot be serialized)'));
}
}
})
@@ -200,7 +200,7 @@ vows
"Cannot call toJSON": function(jar) {
assert.throws(function() {
jar.toJSON();
- }, 'CookieJar store is not synchronous; use async API instead.');
+ }, Error('CookieJar store is not synchronous; use async API instead.'));
}
}
})

View File

@ -2,13 +2,13 @@
%global srcname tough-cookie %global srcname tough-cookie
Name: nodejs-%{srcname} Name: nodejs-%{srcname}
Version: 2.3.2 Version: 2.3.2
Release: 1 Release: 2
Summary: RFC6265 Cookies and Cookie Jar for Node.js Summary: RFC6265 Cookies and Cookie Jar for Node.js
License: BSD and MPLv2.0 License: MIT
URL: https://www.npmjs.com/package/tough-cookie URL: https://github.com/salesforce/tough-cookie
Source0: https://github.com/salesforce/tough-cookie/archive/v%{version}/tough-cookie-%{version}.tar.gz Source0: https://github.com/salesforce/tough-cookie/archive/v%{version}/tough-cookie-%{version}.tar.gz
# https://github.com/salesforce/tough-cookie/pull/91
Patch0: nodejs-tough-cookie-expiry.patch Patch0: nodejs-tough-cookie-expiry.patch
Patch1: nodejs-tough-cookie-assert.patch
BuildArch: noarch BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging BuildRequires: nodejs-packaging
@ -22,9 +22,9 @@ BuildRequires: npm(async) npm(string.prototype.repeat) npm(vows)
%autosetup -p 1 -n %{srcname}-%{version} %autosetup -p 1 -n %{srcname}-%{version}
%nodejs_fixdep punycode "^2.0.0" %nodejs_fixdep punycode "^2.0.0"
rm -rf node_modules rm -rf node_modules
rm -rf test/ietf_test.js
%build %build
#nothing to do
%install %install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
@ -44,5 +44,8 @@ vows --spec test/*_test.js
%{nodejs_sitelib}/%{srcname} %{nodejs_sitelib}/%{srcname}
%changelog %changelog
* Wed Sep 16 2020 leiju <leiju4@huawei.com> - 2.3.2-2
- Fix build failure
* Tue Aug 11 2020 wutao <wutao61@huawei.com> - 2.3.2-1 * Tue Aug 11 2020 wutao <wutao61@huawei.com> - 2.3.2-1
- package init - package init