File: fix-test.diff

package info (click to toggle)
node-buffer-shims 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 180 kB
  • sloc: javascript: 836; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 1,209 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: disable 3 tests that fail even using npm i
Author: Xavier Guimard <yadd@debian.org>
Forwarded: no
Last-Update: 2020-07-09

--- a/test/alloc.js
+++ b/test/alloc.js
@@ -836,8 +836,8 @@ assert.equal(0, bufferShim.from('hello')
 // t.toString();
 // // throws bad argument error in commit 43cb4ec
 // bufferShim.alloc(3.3).fill().toString();
-assert.equal(bufferShim.allocUnsafe(-1).length, 0);
-assert.equal(bufferShim.allocUnsafe(NaN).length, 0);
+//assert.equal(bufferShim.allocUnsafe(-1).length, 0);
+//assert.equal(bufferShim.allocUnsafe(NaN).length, 0);
 //assert.equal(bufferShim.allocUnsafe(3.3).length, 3);
 //assert.equal(bufferShim.from({ length: 3.3 }).length, 3);
 assert.equal(bufferShim.from({ length: 'BAM' }).length, 0);
@@ -1160,9 +1160,9 @@ assert.throws(function () {
 }, TypeError);
 
 // Test that ParseArrayIndex handles full uint32
-assert.throws(function () {
-  bufferShim.from(new ArrayBuffer(0), -1 >>> 0);
-}, /RangeError: 'offset' is out of bounds/);
+//assert.throws(function () {
+//  bufferShim.from(new ArrayBuffer(0), -1 >>> 0);
+//}, /RangeError: 'offset' is out of bounds/);
 
 // Unpooled buffer (replaces SlowBuffer)
 var ubuf = bufferShim.allocUnsafeSlow(10);