v24.13.0
arwin Richards-MacBook-Air.local 25.2.0 Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:55 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T8103 arm64
https
The following script will fail:
const https = require('https')
const fs = require('fs')
const assert = require('assert')
const url = 'https://storage.googleapis.com/chrome-for-testing-public/145.0.7632.77/mac-arm64/chrome-mac-arm64.zip'
const request = https.request(url, response => {
const contentLength = response.headers['content-length']
response.pipe(fs.createWriteStream('test.zip'))
response.on('end', () => {
const stats = fs.statSync('test.zip')
assert.equal(stats.size, contentLength)
})
})
request.end()
100% of the time.
No error.
AssertionError [ERR_ASSERTION]: 170216693 == '170231101'
at IncomingMessage.<anonymous> (tmp.js:12:12)
at IncomingMessage.emit (node:events:520:35)
at endReadableNT (node:internal/streams/readable:1701:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 170216693,
expected: '170231101',
operator: '==',
diff: 'simple'
}
No response