Skip to content

Commit 6b71f3c

Browse files
Copilotfengmk2
andauthored
test: align streaming warning text
Agent-Logs-Url: https://github.com/node-modules/compressing/sessions/220b4855-39a4-4453-9161-12eca9fa08db Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
1 parent 83bce17 commit 6b71f3c

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/tar/file_stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TarFileStream extends stream.Transform {
4040

4141
if (!opts.size) {
4242
if (!opts.suppressSizeWarning) {
43-
console.warn('You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
43+
console.warn('You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
4444
}
4545
}
4646

lib/tar/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class TarStream extends BaseStream {
116116
.catch(error => this.emit('error', error));
117117
} else {
118118
if (!opts.suppressSizeWarning) {
119-
console.warn('You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
119+
console.warn('You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
120120
}
121121
utils.streamToBuffer(entry)
122122
.then(buffer => {

test/tar/file_stream.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('test/tar/file_stream.test.js', () => {
1818
// console.log('dest', destFile);
1919

2020
mm(console, 'warn', msg => {
21-
assert(msg === 'You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
21+
assert(msg === 'You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
2222
});
2323

2424
const fileStream = fs.createWriteStream(destFile);

test/tar/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('test/tar/index.test.js', () => {
6868
// console.log('dest', destFile);
6969
const fileStream = fs.createWriteStream(destFile);
7070
mm(console, 'warn', msg => {
71-
assert(msg === 'You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
71+
assert(msg === 'You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
7272
});
7373
await compressing.tar.compressFile(sourceStream, fileStream, { relativePath: 'xx.log' });
7474
assert(fs.existsSync(destFile));

test/tar/stream.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('test/tar/stream.test.js', () => {
130130
// console.log('dest', destFile);
131131

132132
mm(console, 'warn', msg => {
133-
assert(msg === 'You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
133+
assert(msg === 'You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
134134
});
135135

136136
const tarStream = new TarStream();

test/tgz/stream.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('test/tgz/stream.test.js', () => {
130130
// console.log('dest', destFile);
131131

132132
mm(console, 'warn', msg => {
133-
assert(msg === 'You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
133+
assert(msg === 'You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
134134
});
135135

136136
const tgzStream = new TgzStream();

test/zip/stream.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('test/zip/stream.test.js', () => {
129129
// console.log('dest', destFile);
130130

131131
mm(console, 'warn', msg => {
132-
assert(msg === 'You should specify the size of streamming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
132+
assert(msg === 'You should specify the size of streaming data by opts.size to prevent all streaming data from loading into memory. If you are sure about memory cost, pass opts.suppressSizeWarning: true to suppress this warning');
133133
});
134134

135135
const zipStream = new ZipStream();

0 commit comments

Comments
 (0)