Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: withoutManifest testing helper #126

Merged
merged 1 commit into from
Sep 21, 2021
Merged

Conversation

innocenzi
Copy link
Owner

Usage:

test('login screen can be rendered', function () {
    Vite::withoutManifest();

    this()
        ->get('/#')
        ->assertStatus(Response::HTTP_OK);
});

Fixes #123

@innocenzi innocenzi merged commit 6943247 into main Sep 21, 2021
@innocenzi innocenzi deleted the feat/without-manifest branch September 21, 2021 14:12
@flick36
Copy link
Contributor

flick36 commented Dec 23, 2021

Are there any advantages on using

if (! App::environment('local')) {
    return true;
}

over

if (App::environment('production')) {
    return true;
}

in line 196 of the src\Vite.php file

I think the only real use scenario for manifest is in production anyway, everything else can be without it and that way we don't have to put Vite::withoutManifest(); on each test? or anywhere really?

Edit: I mean for newcomers, one would expect everything to work out of the box, but the test that comes from default are failing, and since you added the withManifest() method as well, i believe is more convenient to use that if needed than having everything failing on the package install/replacement.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing without prebuilt javascript
2 participants