not->toBeFalse('Die Alpine-Komponente `chart` gibt es nicht mehr — dieser Test braucht einen neuen Anker.'); // Der Rumpf bis zur nächsten Alpine-Komponente. $next = strpos($js, 'Alpine.data(', $start + 20); $body = substr($js, $start, $next === false ? 4000 : $next - $start); expect($body) // In der Closure, nicht am Objekt. ->toContain('let instance = null') // `instance: null` als Objekt-Eigenschaft ist genau der Rückfall. ->not->toMatch('/^\s*instance:\s/m') ->not->toContain('this.instance'); }); it('still offers the live update path the host page depends on', function () { $js = file_get_contents(base_path('resources/js/app.js')); $blade = file_get_contents(base_path('resources/views/components/ui/chart.blade.php')); // Ohne diesen Weg zeigt die Lastkurve für immer die Werte des Seitenaufrufs. expect($js)->toContain('window.addEventListener(updateOn') ->and($js)->toContain("instance.update('none')") ->and($blade)->toContain('updateOn'); });