Skip to content

Commit 61225ea

Browse files
ianwhitedeveloperaddaleax
authored andcommitted
test: refactor test-fs-append-file-sync
Change instances of `asset.equal` to `assert.strictEqual`. PR-URL: #9977 Reviewed-By: Colin Ihrig <[email protected]>
1 parent f093760 commit 61225ea

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎test/parallel/test-fs-append-file-sync.js‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fs.appendFileSync(filename, data);
2424

2525
varfileData=fs.readFileSync(filename);
2626

27-
assert.equal(Buffer.byteLength(data),fileData.length);
27+
assert.strictEqual(Buffer.byteLength(data),fileData.length);
2828

2929
// test that appends data to a non empty file
3030
varfilename2=join(common.tmpDir,'append-sync2.txt');
@@ -34,8 +34,8 @@ fs.appendFileSync(filename2, data);
3434

3535
varfileData2=fs.readFileSync(filename2);
3636

37-
assert.equal(Buffer.byteLength(data)+currentFileData.length,
38-
fileData2.length);
37+
assert.strictEqual(Buffer.byteLength(data)+currentFileData.length,
38+
fileData2.length);
3939

4040
// test that appendFileSync accepts buffers
4141
varfilename3=join(common.tmpDir,'append-sync3.txt');
@@ -46,7 +46,7 @@ fs.appendFileSync(filename3, buf);
4646

4747
varfileData3=fs.readFileSync(filename3);
4848

49-
assert.equal(buf.length+currentFileData.length,fileData3.length);
49+
assert.strictEqual(buf.length+currentFileData.length,fileData3.length);
5050

5151
// test that appendFile accepts numbers.
5252
varfilename4=join(common.tmpDir,'append-sync4.txt');
@@ -58,13 +58,13 @@ fs.appendFileSync(filename4, num,{mode: m });
5858
// windows permissions aren't unix
5959
if(!common.isWindows){
6060
varst=fs.statSync(filename4);
61-
assert.equal(st.mode&0o700,m);
61+
assert.strictEqual(st.mode&0o700,m);
6262
}
6363

6464
varfileData4=fs.readFileSync(filename4);
6565

66-
assert.equal(Buffer.byteLength(''+num)+currentFileData.length,
67-
fileData4.length);
66+
assert.strictEqual(Buffer.byteLength(''+num)+currentFileData.length,
67+
fileData4.length);
6868

6969
// test that appendFile accepts file descriptors
7070
varfilename5=join(common.tmpDir,'append-sync5.txt');
@@ -76,8 +76,8 @@ fs.closeSync(filename5fd);
7676

7777
varfileData5=fs.readFileSync(filename5);
7878

79-
assert.equal(Buffer.byteLength(data)+currentFileData.length,
80-
fileData5.length);
79+
assert.strictEqual(Buffer.byteLength(data)+currentFileData.length,
80+
fileData5.length);
8181

8282
//exit logic for cleanup
8383

0 commit comments

Comments
(0)