Skip to content

Commit

Permalink
squash: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
LiviaMedeiros committed Nov 5, 2024
1 parent 5369c71 commit 5d01b37
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/parallel/test-fs-constants.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
'use strict';
require('../common');
const { expectWarning } = require('../common');
const fs = require('fs');
const assert = require('assert');

// Check if the two constants accepted by chmod() on Windows are defined.
assert.notStrictEqual(fs.constants.S_IRUSR, undefined);
assert.notStrictEqual(fs.constants.S_IWUSR, undefined);

expectWarning(
'DeprecationWarning',
'fs.F_OK is deprecated, use fs.constants.F_OK instead',
'DEP0176'
);
fs.F_OK;

Check failure on line 15 in test/parallel/test-fs-constants.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected an assignment or function call and instead saw an expression
fs.R_OK;

Check failure on line 16 in test/parallel/test-fs-constants.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected an assignment or function call and instead saw an expression
fs.W_OK;

Check failure on line 17 in test/parallel/test-fs-constants.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected an assignment or function call and instead saw an expression
fs.X_OK;

Check failure on line 18 in test/parallel/test-fs-constants.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected an assignment or function call and instead saw an expression

0 comments on commit 5d01b37

Please sign in to comment.