diff --git a/.gitignore b/.gitignore index c199ebd..e067c1f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ coverage.xml *.swp *.swo .phpunit.cache - # Playwright node_modules/ /test-results/ diff --git a/.temp/e2e/.gitignore b/.temp/e2e/.gitignore new file mode 100644 index 0000000..78d9101 --- /dev/null +++ b/.temp/e2e/.gitignore @@ -0,0 +1,2 @@ +/* +!.gitignore diff --git a/.temp/e2e/.gitkeep b/.temp/e2e/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/.temp/e2e/runtime.spec.js b/.temp/e2e/runtime.spec.js deleted file mode 100644 index e4cf9ce..0000000 --- a/.temp/e2e/runtime.spec.js +++ /dev/null @@ -1,6 +0,0 @@ -import { test, expect } from '@playwright/test'; - -test('runtime', async ({ page }) => { - await page.goto('https://laravel.com'); -await expect(page).toHaveTitle(/Laravel/); -}); \ No newline at end of file diff --git a/src/PendingTest.php b/src/PendingTest.php index 3b82a2f..75cc26e 100644 --- a/src/PendingTest.php +++ b/src/PendingTest.php @@ -47,9 +47,9 @@ public function toHaveTitle(string $title): self } /** - * Build the test result. + * Compile the JavaScript test file. */ - public function build(): void + public function compile(): void { $compiler = new Compiler($this->operations); @@ -61,4 +61,12 @@ public function build(): void expect($result->ok())->toBeTrue(); } + + /** + * Ends the chain and builds the test result. + */ + public function __destruct() + { + $this->compile(); + } }