Skip to content

Commit

Permalink
Merge pull request #138 from joedixon/fix/handle-pest-allow-plugins
Browse files Browse the repository at this point in the history
Handles composer.json files when Pest is set as an allowable plugin
  • Loading branch information
calebporzio authored Oct 11, 2023
2 parents a920e47 + 6f206e8 commit 9ce107b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "better-phpunit",
"displayName": "Better PHPUnit",
"description": "A better PHPUnit test runner",
"version": "1.6.1",
"version": "1.6.2",
"publisher": "calebporzio",
"engines": {
"vscode": "^1.74.0"
Expand Down
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 9ce107b

Please sign in to comment.