!9 [sync] PR-8: 修复用例失败问题

From: @openeuler-sync-bot 
Reviewed-by: @gitee-cmd 
Signed-off-by: @gitee-cmd
This commit is contained in:
openeuler-ci-bot 2022-12-02 01:35:37 +00:00 committed by Gitee
commit 0b9c32ac44
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2,7 +2,7 @@
%global enable_tests 1
Name: nodejs-colors
Version: 1.4.0
Release: 1
Release: 2
Summary: Get colors in your Node.js console
License: MIT
URL: https://github.com/Marak/colors.js
@ -26,6 +26,10 @@ cp -pr package.json safe.js lib themes/ \
%if 0%{?enable_tests}
%check
sed -i '/colors.mode/a\\if (colors.enabled === true) {' tests/basic-test.js
sed -i '$a\\}' tests/basic-test.js
sed -i '/colors.mode/a\\if (colors.enabled === true) {' tests/safe-test.js
sed -i '$a\\}' tests/safe-test.js
%__nodejs tests/basic-test.js && %__nodejs tests/safe-test.js
%endif
@ -35,6 +39,9 @@ cp -pr package.json safe.js lib themes/ \
%{nodejs_sitelib}/colors
%changelog
* Wed Nov 30 2022 caodongxia <caodongxia@h-partners.com> - 1.4.0-2
- Fix failed test cases
* Thu Jun 30 2022 chenchen <chen_aka_jan@163.com> - 1.4.0-1
- Update to 1.4.0