Skip to content

Commit

Permalink
Merge pull request #289 from mbaric/patch-1
Browse files Browse the repository at this point in the history
Add documentation to run pest drift for certain folder only
  • Loading branch information
nunomaduro authored Sep 27, 2024
2 parents c3a4630 + c848082 commit 8c18d58
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions migrating-from-phpunit-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ test('true is true', function () {
});
```

---
## Convert Phpunit tests only for certain folder

If you want to convert Phpunit tests only for certain folder, you can pass _path_ as first argument when calling `--drift`:

Example call, if you want to run the conversion for folder `/tests/Helpers`:
```console
/vendor/bin/pest --drift tests/Helpers
```

Output:
```console
/vendor/bin/pest --drift tests/Helpers

✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔

INFO The [tests/Helpers] directory has been migrated to PEST with XY files changed.
```

---

The output will contain a summary of the conversion process, as well as a list of the files that were converted.

While most of your tests should be converted automatically, and you should be able to run them without any issues, there are some cases where you may need to manually convert some of your tests.
Expand Down

0 comments on commit 8c18d58

Please sign in to comment.