Merge pull request #11235 from electron/standard-10
infra: Upgrade to StandardJS 10
This commit is contained in:
commit
1c0ea0286e
27 changed files with 105 additions and 43 deletions
|
@ -300,7 +300,7 @@ describe('node feature', () => {
|
|||
it('can be created from WebKit external string', () => {
|
||||
const p = document.createElement('p')
|
||||
p.innerText = '闲云潭影日悠悠,物换星移几度秋'
|
||||
const b = new Buffer(p.innerText)
|
||||
const b = Buffer.from(p.innerText)
|
||||
assert.equal(b.toString(), '闲云潭影日悠悠,物换星移几度秋')
|
||||
assert.equal(Buffer.byteLength(p.innerText), 45)
|
||||
})
|
||||
|
@ -308,15 +308,15 @@ describe('node feature', () => {
|
|||
it('correctly parses external one-byte UTF8 string', () => {
|
||||
const p = document.createElement('p')
|
||||
p.innerText = 'Jøhänñéß'
|
||||
const b = new Buffer(p.innerText)
|
||||
const b = Buffer.from(p.innerText)
|
||||
assert.equal(b.toString(), 'Jøhänñéß')
|
||||
assert.equal(Buffer.byteLength(p.innerText), 13)
|
||||
})
|
||||
|
||||
it('does not crash when creating large Buffers', () => {
|
||||
let buffer = new Buffer(new Array(4096).join(' '))
|
||||
let buffer = Buffer.from(new Array(4096).join(' '))
|
||||
assert.equal(buffer.length, 4095)
|
||||
buffer = new Buffer(new Array(4097).join(' '))
|
||||
buffer = Buffer.from(new Array(4097).join(' '))
|
||||
assert.equal(buffer.length, 4096)
|
||||
})
|
||||
})
|
||||
|
@ -324,6 +324,7 @@ describe('node feature', () => {
|
|||
describe('process.stdout', () => {
|
||||
it('does not throw an exception when accessed', () => {
|
||||
assert.doesNotThrow(() => {
|
||||
// eslint-disable-next-line
|
||||
process.stdout
|
||||
})
|
||||
})
|
||||
|
@ -358,7 +359,7 @@ describe('node feature', () => {
|
|||
describe('process.stdin', () => {
|
||||
it('does not throw an exception when accessed', () => {
|
||||
assert.doesNotThrow(() => {
|
||||
process.stdin
|
||||
process.stdin // eslint-disable-line
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue