-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add cargo fmt check command to package.json #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c86b597
2c0214d
b15e90d
d0aca4b
44ac7e3
15cb2c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,7 +19,11 @@ test('realpathSync: should resolve to absolute path', (t) => { | |||||||||||||||||||||||||||||
| test('realpathSync: should match node:fs realpathSync', (t) => { | ||||||||||||||||||||||||||||||
| const nodeResult = nodeFs.realpathSync('.') | ||||||||||||||||||||||||||||||
| const hyperResult = realpathSync('.') | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| if (process.platform === 'win32') { | ||||||||||||||||||||||||||||||
| t.is(nodeFs.realpathSync(hyperResult), nodeFs.realpathSync(nodeResult)) | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| test('realpathSync: should throw on non-existent path', (t) => { | ||||||||||||||||||||||||||||||
|
|
@@ -44,17 +48,24 @@ test('dual-run: realpathSync should resolve symlink to real path', (t) => { | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| const nodeResult = nodeFs.realpathSync(link) | ||||||||||||||||||||||||||||||
| const hyperResult = realpathSync(link) | ||||||||||||||||||||||||||||||
| // Compare against node:fs (not raw `target`): on macOS /tmp is a symlink to /private/tmp, | ||||||||||||||||||||||||||||||
| // so realpath resolves through it. | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| // The resolved path should end with the target filename | ||||||||||||||||||||||||||||||
| if (process.platform === 'win32') { | ||||||||||||||||||||||||||||||
| const nodeHyper = nodeFs.statSync(hyperResult) | ||||||||||||||||||||||||||||||
| const nodeNode = nodeFs.statSync(nodeResult) | ||||||||||||||||||||||||||||||
| t.true(nodeHyper.ino === nodeNode.ino && nodeHyper.dev === nodeNode.dev, 'same file') | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| t.true(hyperResult.endsWith('real-target.txt')) | ||||||||||||||||||||||||||||||
|
Comment on lines
+51
to
58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows The The unconditional ♻️ More robust Windows assertion if (process.platform === 'win32') {
- const nodeHyper = nodeFs.statSync(hyperResult)
- const nodeNode = nodeFs.statSync(nodeResult)
- t.true(nodeHyper.ino === nodeNode.ino && nodeHyper.dev === nodeNode.dev, 'same file')
+ t.is(nodeFs.realpathSync(hyperResult), nodeFs.realpathSync(nodeResult))
} else {
t.is(hyperResult, nodeResult)
}The same pattern applies to the async test at lines 80-86. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| test('dual-run: realpathSync should resolve relative path same as node:fs', (t) => { | ||||||||||||||||||||||||||||||
| const nodeResult = nodeFs.realpathSync('src') | ||||||||||||||||||||||||||||||
| const hyperResult = realpathSync('src') | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| if (process.platform === 'win32') { | ||||||||||||||||||||||||||||||
| t.is(nodeFs.realpathSync(hyperResult), nodeFs.realpathSync(nodeResult)) | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| test('realpath: async dual-run should resolve symlink same as node:fs', async (t) => { | ||||||||||||||||||||||||||||||
|
|
@@ -66,5 +77,11 @@ test('realpath: async dual-run should resolve symlink same as node:fs', async (t | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| const nodeResult = nodeFs.realpathSync(link) | ||||||||||||||||||||||||||||||
| const hyperResult = await realpath(link) | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| if (process.platform === 'win32') { | ||||||||||||||||||||||||||||||
| const nodeHyper = nodeFs.statSync(hyperResult) | ||||||||||||||||||||||||||||||
| const nodeNode = nodeFs.statSync(nodeResult) | ||||||||||||||||||||||||||||||
| t.true(nodeHyper.ino === nodeNode.ino && nodeHyper.dev === nodeNode.dev, 'same file') | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| t.is(hyperResult, nodeResult) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.