| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c77078f commit 999f685
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -988,9 +988,7 @@ assert.throws(() => Buffer.from('', 'buffer'), TypeError); | |||
| 988 | 988 | // Regression test for #6111. Constructing a buffer from another buffer | |
| 989 | 989 | // should a) work, and b) not corrupt the source buffer. | |
| 990 | 990 | { | |
| 991 | - let a = [0]; | ||
| 992 | - for (let i = 0; i < 7; ++i) a = a.concat(a); | ||
| 993 | - a = a.map((_, i) => { return i; }); | ||
| 991 | + const a = [...Array(128).keys()]; // [0, 1, 2, 3, ... 126, 127] | ||
| 994 | 992 | const b = Buffer.from(a); | |
| 995 | 993 | const c = Buffer.from(b); | |
| 996 | 994 | assert.strictEqual(b.length, a.length); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments