Skip to content

Commit b89f26e

Browse files
committed
add info about disabling magic test on tests w/ inertia to readme
1 parent 9d38884 commit b89f26e

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ composer require magic-test/magic-test-laravel --dev
2424

2525
Then, add the following line to your `$middleware` array under `app/Http/Kernel.php`:
2626

27-
```php
28-
\MagicTest\MagicTest\Middleware\MagicTestMiddleware::class
29-
```
30-
3127
## Usage
3228
On your Laravel Dusk tests, simply add `magic()` at the end of your method chain. For example:
3329

@@ -64,6 +60,26 @@ See how it works [on this video](https://twitter.com/mateusjatenee/status/136890
6460

6561
Magic Test is still in it's early days, so you might find that the output is not exactly what you wanted. In that case, [feel free to submit an issue](https://github.com/magic-test/magic-test-laravel/issues/new) and we'll try to improve it ASAP.
6662

63+
## Known issues
64+
65+
Magic Test does not work well with Inertia.js assertions. If you're using Inertia in an integration test, please disable Magic Test by add the following code to your `setUp` method:
66+
67+
```php
68+
<?php
69+
70+
use MagicTest\MagicTest\MagicTest;
71+
72+
class MyTest extends TestCase
73+
{
74+
protected function setUp(): void
75+
{
76+
parent::setUp();
77+
78+
MagicTest::disable();
79+
}
80+
}
81+
```
82+
6783
## Changelog
6884

6985
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

0 commit comments

Comments
 (0)