Update test

This commit is contained in:
raub 2018-05-14 13:28:32 +03:00
parent 7323e76ecc
commit efcb17a23a
1 changed files with 7 additions and 1 deletions

View File

@ -10,7 +10,7 @@ const tools = require('addon-tools-raub');
const toolsDir = path.dirname(require.resolve('addon-tools-raub')).replace(/\\/g, '/'); const toolsDir = path.dirname(require.resolve('addon-tools-raub')).replace(/\\/g, '/');
const allMethods = ['paths', 'root', 'include', 'mkdir', 'rm', 'cp']; const allMethods = ['paths', 'bin', 'root', 'include', 'mkdir', 'rm', 'cp'];
const ownMethods = allMethods.slice(1); const ownMethods = allMethods.slice(1);
const cmdMethods = allMethods.slice(3); const cmdMethods = allMethods.slice(3);
const pathsMethods = ['bin', 'rem', 'include']; const pathsMethods = ['bin', 'rem', 'include'];
@ -46,6 +46,12 @@ describe('Tools', () => {
); );
it('#bin() is correct', () => {
tools.bin();
expect(log.getCall(0).args[0]).to.equal(path.basename(tools.paths(__dirname).binPath));
});
it('#root() is correct', () => { it('#root() is correct', () => {
tools.root(); tools.root();
expect(log.getCall(0).args[0]).to.equal(toolsDir); expect(log.getCall(0).args[0]).to.equal(toolsDir);