Skip to content

Commit

Permalink
explicit check for pest
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Oct 11, 2023
1 parent a920e47 commit c429db1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/phpunit-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = class PhpUnitCommand {
return false;
}

const isPest = fs.readFileSync(composerJson, 'utf8').includes('pestphp/pest');
const isPest = fs.readFileSync(composerJson, 'utf8').includes('"pestphp/pest"');
const end = Date.now();
console.log(`Checking for Pest: ${end - start}ms`)

Expand Down
5 changes: 5 additions & 0 deletions test/project-stub/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
],
"require": {
"phpunit/phpunit": "^6.4"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
5 changes: 5 additions & 0 deletions test/project-stub/sub-directory/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@
],
"require": {
"phpunit/phpunit": "^6.4"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}

0 comments on commit c429db1

Please sign in to comment.