GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix fs test-fs-utimes strictEqual arg order · nodejs/node@e2174e4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-fs-utimes.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-fs-utimes.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-utimes.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ if (!process.arch.includes('arm') &&
150150
const Y2K38_mtime = 2 ** 31;
151151
fs.utimesSync(path, Y2K38_mtime, Y2K38_mtime);
152152
const Y2K38_stats = fs.statSync(path);
153-
assert.strictEqual(Y2K38_mtime, Y2K38_stats.mtime.getTime() / 1000);
153+
assert.strictEqual(Y2K38_stats.mtime.getTime() / 1000, Y2K38_mtime);
154154
}
155155

156156
if (common.isWindows) {
157157
// This value would get converted to (double)1713037251359.9998
158158
const truncate_mtime = 1713037251360;
159159
fs.utimesSync(path, truncate_mtime / 1000, truncate_mtime / 1000);
160160
const truncate_stats = fs.statSync(path);
161-
assert.strictEqual(truncate_mtime, truncate_stats.mtime.getTime());
161+
assert.strictEqual(truncate_stats.mtime.getTime(), truncate_mtime);
162162

163163
// test Y2K38 for windows
164164
// This value if treaded as a `signed long` gets converted to -2135622133469.
@@ -168,7 +168,7 @@ if (common.isWindows) {
168168
const overflow_mtime = 2159345162531;
169169
fs.utimesSync(path, overflow_mtime / 1000, overflow_mtime / 1000);
170170
const overflow_stats = fs.statSync(path);
171-
assert.strictEqual(overflow_mtime, overflow_stats.mtime.getTime());
171+
assert.strictEqual(overflow_stats.mtime.getTime(), overflow_mtime);
172172
}
173173

174174
const expectTypeError = {

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.