Code Monkey home page Code Monkey logo

better-pest's Introduction

Hi there ๐Ÿ‘‹

I'm a 22-year-old maker, and I love building things.

I work at Worldcoin, building the most scalable & private sybil-resistance solution.

In my free time, I like to build. Here's a few of my favourite open-source projects:

  • cog-rust: Rust containers for machine learning.
  • ensemble: A Laravel-inspired ORM for Rust.
  • commit: A command palette-style Git client for blazing-fast commits.
  • lil-web3: Simple, intentionally-limited versions of web3 protocols & apps.
  • auto-commit: Rust CLI that automatically writes commit messages for you, built in Rust.
  • yt-whisper: Automatically generate subtitles for YouTube videos, using OpenAI's Whisper.
  • plz-cli: Copilot for your terminal
  • armchair: A Next.js starter kit for full-stack web3 apps.
  • php-evm: A PHP implementation of the Ethereum Virtual Machine, because why not.
  • connect4-sol: A hyper-optimised Connect 4 implementation on Solidity.
  • ...

better-pest's People

Contributors

asmerkin avatar calebporzio avatar danitulp avatar emil-nasso avatar fuel-odrais avatar iforwms avatar jbreuer95 avatar julianmar avatar lapenna avatar m1guelpf avatar qkdreyer avatar samsouder avatar sixlive avatar thecrypticace avatar wilburpowery avatar zebranorth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

better-pest's Issues

Better Pest doesn't run tests anymore

What are the steps to reproduce this issue?

  1. Open up test file
  2. Run a better pest command. Via shortcut or via command palette
  3. โ€ฆ

What happens?

Nothing. The integrated terminal gets cleared but there is no feedback

What were you expecting to happen?

Feedback of the tests that should be running

Any logs, error output, etc?

No errors, no logs found

Any other comments?

My terminal is configured to zsh. Running pest manually via the terminal does run.

What versions are you using?

Operating System: Mac OS Ventura
Package Version: v0.1.0

Wrong PHP version on June 2021 (version 1.58)

What are the steps to reproduce this issue?

  1. Install 1.58
  2. Run Better Pest on a test file
  3. Uses the wrong PHP version in composer

What happens?

Errors out on using wrong PHP version for platform_check.

What were you expecting to happen?

For it to test the file or filter.

Any other comments?

I downgraded to May 2021 (version 1.57) & it works.

What versions are you using?

Mac OS
Better Pest Version: v0.1.0

`Better Pest:run` doesn't work when using the `Pest\Laravel\get` method

What are the steps to reproduce this issue?

  1. Install Pest and the Laravel plugin for it
  2. Create the following test
it('shows the home page', function () {
    get("/")->assertOk();
});
  1. Place the cursor on line 2 and run the Better Pest:run command

What happens?

The terminal outputs
No tests executed!

What were you expecting to happen?

For the command to correctly detect the test function that the cursor is within and run that test.

it('expects true is true', function () {
    expect(true)->toBeTrue();
});

Place the cursor on line 2 of this test and run the command, it works as expected.

Fall back to PHPUnit

Summary

Ability to fall back to PHPUnit when Pest isn't installed.

Detailed Description

Before starting to use Pest, I would have the "Better PHPUnit" package installed. I still have projects that use PHPUnit.
Having both installed doesn't really work due to the keyboard shortcuts conflict. If this package could detect whether Pest is installed, it could run pest, otherwise fall back to phpunit.

Maybe this is already possible?

Pest Test Explorer

Summary

Does better-pest have a test explorer for vscode?

Detailed Description

Does better-pest have a test explorer for vscode? If not, do you have a suggestion for one to use or could one be added?

Possible Implementation Ideas

Tasks not running from a day to another

What are the steps to reproduce this issue?

  1. install pest
  2. instal better pest extension
  3. run a file/test/suit

What happens?

Yesterday I've been working regulary, and today, the tasks for running tests stopped working.

What were you expecting to happen?

The tests command to appear in terminal

Any logs, error output, etc?

Everything empty.

Any other comments?

I tried restarting the whole extension and nothing happens (delete the extension from vscode and delete the folder manualy)

What versions are you using?

Operating System: Windows 10
Package Version: v0.1.0

Wrong property name for better-phpunit.pestBinary

What are the steps to reproduce this issue?

  1. When configure pest binary using vscode config screen the property better-phpunit.pestBinary appears. The right is better-pest.pestBinary

What happens?

Using wrong property is highlighted right but not work. Switch to working property will not highlight but works.

unexpected EOF while looking for matching `''

What are the steps to reproduce this issue?

  1. Place in the title of any test a single quote ' for example: check the plan\'s seating limit
  2. Execute the test

What happens?

The test does not run

What were you expecting to happen?

That the test runs normally

Any logs, error output, etc?

/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
/bin/bash: -c: line 2: syntax error: unexpected end of file

What versions are you using?

Operating System: Windows 10
Package Version: v0.1.0

Laravel Herd Project Test Run

What are the steps to reproduce this issue?

  1. Setup a minimal Laravel Herd project
    (for more detail follow along: https://youtu.be/w-cebRYZH9E)

What happens?

After installing the VSCode Extension, adding the keyboard shortcuts to my VSCode settings and trying to run a pest with
cmd+k cmd+r the terminal displays the following to happen:

image

OS and Plugin Version: I am using macOS Ventura 13.5 and the Better Pest v0.1.0 version

Am I missing something obvious or do I have any additional configurations to make?

Thanks in advance
Felix

Unable to clear terminal screen with default "โŒ˜-K" shortcut

What are the steps to reproduce this issue?

  1. Install extension
  2. Focus integrated terminal
  3. Press โŒ˜-K

What happens?

The status bar shows the following message:
"(โŒ˜K) was pressed. Waiting for second key of chord."

What were you expecting to happen?

The terminal screen should be cleared.

Any other comments?

Disabling this extension fixes the issue.

What versions are you using?

Operating System: macOS Ventura 13.2.1
Package Version: v0.1.0

Fails when config helper function is used

What are the steps to reproduce this issue?

test('it can read config values', function() {
    $this->assertEquals(config('my-package.name'), 'My Package');
}

When running the test using Cmd+K, Cmd+R

What happens

It gives an error Target class [config] does not exist.

What were you expecting to happen?

It should run the test without giving the above error. When I run the test from terminal it runs flawlessly without any error.
I am running this test from within a local package using Orchestra Testbench.

Any logs, error output, etc?

โ€ฆ

Any other comments?

It's actually not picking up tests\Pest.php or even uses(Orchestra\Testbench\TestCase::class) in the file when run thru the extension in vscode (from within a local Laravel package)
However, it picks up both tests\Pest.php and/or uses(Orchestra\Testbench\TestCase::class) in the file when run from the terminal (again from within a local Laravel Package)

What versions are you using?

Operating System: macOS 10.15.7
Package Version: 0.3.1

Delay before running tests

What are the steps to reproduce this issue?

  1. Have Better Pest extension installed
  2. Spin up a new laravel project with Breeze into Pest
  3. Open up the example test file
  4. Run the test using Better Pest's keybinding

What happens?

Terminal is delayed for around 5 seconds, then it opens up and the testing begins.

What were you expecting to happen?

Expected the terminal to open up instantly and begin testing.

Any logs, error output, etc?

Observation 1: If the same terminal stays up, then I run the test again (like using the "run the previous test" command), then the terminal clears up except for the first circle (being emptied), then everything is delayed for about 5 seconds, then the testing begins by then!
Observation 2: There is no delay with pest tests ran through php artisan test at any point in time.

Any other comments?

Workaround: If I run Better PHPUnit to test the pest file, I get the error, but then the response from VSC is back to normal; instantly running the tests using Better Pest's keybinding! That error has to be triggered in order to do something to VSC and make it respond normally to testing!

What versions are you using?

Operating System: 5.19.0-43-generic #44-Ubuntu x86_64 GNU/Linux
Package Version: 0.1.0
VSC Version: 1.79.0

It doesn't filter the test when using with lando/docker

I'm not sure where the problem is, but using Better Pest with lando (docker) on Windows, it fails to filter the test.

NOTE: If I run the full command, same as the Better Pest task is running, in a terminal, everything works as expected, i.e. only one test is run!

image

Abandoned?

This is the officially recommended version to use from https://pestphp.com/docs/editor-setup. Yet it hasnt had updates since October 25, 2020.

By the way, I'm the maintainer for the Psalm VSCode plugin (https://github.com/psalm/psalm-vscode-plugin)

@m1guelpf would you be willing to add collaborators? I'd be willing to work on these.

Add retry test after task is finished

Summary

Add retry test after task is finished.

Detailed Description

Currently when a task is finished, the only option is to close it.

image

It will be very helpful if there is a retry test too.
So when we finished fixing the test, we don't need to go to test file and run test again, just retry on the terminal output.

Possible Implementation Ideas

Use keyboard key r to retry
Use other keys to close

Filter option doesn't work in packages

What are the steps to reproduce this issue?

  1. Initialize an empty composer project (with composer init)
  2. Install Pest PHP according to documentation
  3. Create a Pest test and run the better-pest.run command
  4. In the terminal it says: No tests executed!

What happens?

I think Pest requires filters in packages to include underscores, even if they don't have them in the test name.

Given I have this test:

it('is true', function () {
    expect(true)->toBeTrue();
});

When I run better-pest.run, it translates to ./vendor/bin/pest TestFile.php --filter 'is true' in the terminal.

But instead it should be ./vendor/bin/pest TestFile.php --filter 'is_true', with underscores, as that does work.

What were you expecting to happen?

To replace spaces by underscores.

What versions are you using?

Operating System: MacOS
Pest Version: dev-master

Allow tests to run on external terminal

Summary

Allow option to open external terminal when running tests

Detailed Description

When running tests on a small screen and VS Code uses its terminal tab, the results can get difficult to read since there is no space in the screen.

An interesting solution possibly would be to allow the users to opt in to run tests in an external terminal so the results will be displayed on a larger window.

Possible Implementation Ideas

How to hide terminal end task

Hello,

When run vscode extension this, terminal show end, how to hide it?

The terminal process "/bin/zsh '-l', '-i', '-c' ...
Terminal will be reused by tasks, press any key to close it. 

But when run with termial it not show

Thanks !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.