diff --git a/Fix-AssertionError-detection-for-node.patch b/Fix-AssertionError-detection-for-node.patch new file mode 100644 index 0000000..0e6e2fc --- /dev/null +++ b/Fix-AssertionError-detection-for-node.patch @@ -0,0 +1,22 @@ +From abe1ef2f3fdfaf8c12a28af4abdcfc9057b8410c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= +Date: Thu, 4 Jan 2018 00:56:06 +0100 +Subject: [PATCH] Fix AssertionError detection for node > 6 + +--- + test.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test.js b/test.js +index 3a17e3c..f751076 100644 +--- a/test.js ++++ b/test.js +@@ -41,7 +41,7 @@ function Test(name, unit, logger, Assert) { + if (isSync) assert.end() + } + } catch (exception) { +- if (ERR_EXPECT === exception.name) assert.fail(exception) ++ if (exception.name && exception.name.startsWith(ERR_EXPECT)) assert.fail(exception) + else logger.error(exception) + assert.end() + } diff --git a/nodejs-test.spec b/nodejs-test.spec index 13063cf..923dab8 100644 --- a/nodejs-test.spec +++ b/nodejs-test.spec @@ -1,30 +1,30 @@ -# needed for building on el6 %{?nodejs_find_provides_and_requires} %global enable_tests 1 %global srcname test %global owner gozala Name: nodejs-%{srcname} Version: 0.6.0 -Release: 1 +Release: 2 Summary: (Un)CommonJS test runner License: MIT URL: https://github.com/Gozala/test-commonjs -Source0: https://registry.npmjs.org/test/-/test-%{version}.tgz +Source0: https://github.com/Gozala/test-commonjs/archive/v%{version}.tar.gz +Patch0000: Fix-AssertionError-detection-for-node.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: nodejs-ansi-font %endif + %description %{summary}. %prep -%setup -qn package +%autosetup -n test-commonjs-%{version} -p1 -S git rm -rf node_modules %build -#nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} @@ -45,5 +45,8 @@ cp -pr package.json *.js \ %{nodejs_sitelib}/%{srcname} %changelog +* Wed Sep 16 2020 leiju - 0.6.0-2 +- Fix AssertionError detection for node + * Tue Aug 11 2020 wutao - 0.6.0-1 - package init diff --git a/test-0.6.0.tgz b/test-0.6.0.tgz deleted file mode 100644 index 9e0043b..0000000 Binary files a/test-0.6.0.tgz and /dev/null differ diff --git a/v0.6.0.tar.gz b/v0.6.0.tar.gz new file mode 100644 index 0000000..26f4cc8 Binary files /dev/null and b/v0.6.0.tar.gz differ