Skip to content

Commit

Permalink
Fixed non-windows absolute path test
Browse files Browse the repository at this point in the history
  • Loading branch information
Antyos committed Apr 1, 2020
1 parent 47f13ad commit acc029c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('commandExists', function(){
describe('absolute path', function() {
if (!isUsingWindows) {
it('it should report true if there is a command with that name in absolute path', function(done) {
var commandToUse = resolve('./test/executable-script.cmd')
var commandToUse = resolve('test/executable-script.js');
commandExists(commandToUse)
.then(function(command){
expect(command).to.be(commandToUse);
Expand All @@ -141,13 +141,13 @@ describe('commandExists', function(){
});

it('it should report false if there is not a command with that name in absolute path', function() {
var commandToUse = resolve('./executable-script.cmd')
var commandToUse = resolve('executable-script.js');
expect(commandExists.sync(commandToUse)).to.be(false);
});
}
if (isUsingWindows) {
it('it should report true if there is a command with that name in absolute path', function(done) {
var commandToUse = resolve('.\\test\\executable-script.cmd')
var commandToUse = resolve('test\\executable-script.cmd');
commandExists(commandToUse)
.then(function(command){
expect(command).to.be(commandToUse);
Expand All @@ -156,7 +156,7 @@ describe('commandExists', function(){
});

it('it should report false if there is not a command with that name in absolute path', function() {
var commandToUse = resolve('.\\executable-script.cmd')
var commandToUse = resolve('executable-script.cmd');
expect(commandExists.sync(commandToUse)).to.be(false);
});
}
Expand Down

0 comments on commit acc029c

Please sign in to comment.