Fix tests for node 12.x support
This commit is contained in:
parent
0af5803733
commit
57f1d38538
26
nodejs-eyes-node12.patch
Normal file
26
nodejs-eyes-node12.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
commit 9ea7bf2a3d414ace352eaaafb0557567848020d3
|
||||||
|
Author: Nilesh <npatra974@gmail.com>
|
||||||
|
Date: Wed Jan 22 20:36:50 2020 +0000
|
||||||
|
|
||||||
|
Remove deprecated syntax to work with Node.js >= 12
|
||||||
|
|
||||||
|
diff --git a/test/eyes-test.js b/test/eyes-test.js
|
||||||
|
index 1f9606a..a320ec0 100644
|
||||||
|
--- a/test/eyes-test.js
|
||||||
|
+++ b/test/eyes-test.js
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-var util = require('util');
|
||||||
|
var eyes = require('../lib/eyes');
|
||||||
|
|
||||||
|
eyes.inspect({
|
||||||
|
@@ -50,7 +49,7 @@ eyes.inspect([null], "null in array");
|
||||||
|
|
||||||
|
var inspect = eyes.inspector({ stream: null });
|
||||||
|
|
||||||
|
-util.puts(inspect('something', "something"));
|
||||||
|
-util.puts(inspect("something else"));
|
||||||
|
+console.log(inspect('something', "something"));
|
||||||
|
+console.log(inspect("something else"));
|
||||||
|
|
||||||
|
-util.puts(inspect(["no color"], null, { styles: false }));
|
||||||
|
+console.log(inspect(["no color"], null, { styles: false }));
|
||||||
@ -2,11 +2,12 @@
|
|||||||
%global enable_tests 1
|
%global enable_tests 1
|
||||||
Name: nodejs-eyes
|
Name: nodejs-eyes
|
||||||
Version: 0.1.8
|
Version: 0.1.8
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A customizable value inspector for Node.js
|
Summary: A customizable value inspector for Node.js
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/cloudhead/eyes.js
|
URL: https://github.com/cloudhead/eyes.js
|
||||||
Source0: https://github.com/cloudhead/eyes.js/archive/v%{version}.tar.gz
|
Source0: https://github.com/cloudhead/eyes.js/archive/v%{version}.tar.gz
|
||||||
|
Patch0001: nodejs-eyes-node12.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
ExclusiveArch: %{nodejs_arches} noarch
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
||||||
@ -15,7 +16,7 @@ BuildRequires: nodejs-packaging
|
|||||||
%{summary}
|
%{summary}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n eyes.js-%{version}
|
%autosetup -n eyes.js-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -35,5 +36,8 @@ cp -pr package.json lib/ \
|
|||||||
%{nodejs_sitelib}/eyes
|
%{nodejs_sitelib}/eyes
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 20 2020 lingsheng <lingsheng@huawei.com> - 0.1.8-2
|
||||||
|
- Fix tests for node 12.x support
|
||||||
|
|
||||||
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.1.8-1
|
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.1.8-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user