Skip to content

Commit

Permalink
update spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nitsakh committed Oct 15, 2018
1 parent fa62ebd commit be58839
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions spec/api-process-spec.js
Expand Up @@ -38,10 +38,18 @@ describe('process module', () => {
})
})

describe('process.getMemoryFootprint()', () => {
describe('process.getProcessMemoryInfo()', async () => {
it('resolves promise successfully with non zero value', async () => {
let memoryFootprint = await process.getMemoryFootprint()
expect(memoryFootprint).to.be.a('number').greaterThan(0)
const memoryInfo = await process.getProcessMemoryInfo()
expect(memoryInfo).to.be.an('object')
if (process.platform === 'linux') {
expect(memoryInfo.residentSetBytes).to.be.a('number').greaterThan(0)
}
if (process.platform === 'windows') {
expect(memoryInfo.workingSetSize).to.be.a('number').greaterThan(0)
}
expect(memoryInfo.privateBytes).to.be.a('number').greaterThan(0)
expect(memoryInfo.sharedBytes).to.be.a('number').greaterThan(0)
})
})

Expand Down

0 comments on commit be58839

Please sign in to comment.