Skip to content

Commit

Permalink
feat: add totalmem on os info
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Apr 10, 2019
1 parent d1e2b58 commit 21d54ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
platform,
release,
tmpdir,
totalmem,
} from 'os';
import {
camelCase,
Expand Down Expand Up @@ -675,6 +676,7 @@ export const osInfo = () => {
platform: platform(),
release: release(),
tmpdir: tmpdir(),
totalmem: totalmem(),
};
// return collected os information
return info;
Expand Down
3 changes: 3 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,5 +373,8 @@ describe('common', () => {

expect(info.tmpdir).to.exist;
expect(info.tmpdir).to.be.a('string');

expect(info.totalmem).to.exist;
expect(info.totalmem).to.be.a('number');
});
});

0 comments on commit 21d54ca

Please sign in to comment.