GithubHelp home page GithubHelp logo

Embracing Testing about short-url HOT 8 CLOSED

LogicSatinn avatar LogicSatinn commented on July 17, 2024
Embracing Testing

from short-url.

Comments (8)

LogicSatinn avatar LogicSatinn commented on July 17, 2024 1

@LogicSatinn Yeah I agree that it could probably make testing a bit easier for anyone using the package. I think I'd class it more as a "nice-to-have" though rather than "absolutely necessary" haha! 😄

I've put a tweet to get other dev's opinions on whether they'd expect a package to provide factories, or whether you should implement them yourselves. I'll wait until I've got a bit more feedback before I go ahead with making any changes. So I'll probably come back to this in a few days.

But if we end up going forward with it, I'd be cool for you to PR the changes 🙂

Absolutely 🔥... I'll keep my eyes out on the response and hear what other devs might say about that.

from short-url.

LogicSatinn avatar LogicSatinn commented on July 17, 2024 1

@LogicSatinn Yeah, I agree, it looks like this is something that some people might like. I'm cool with you to make a PR if you'd like? 🙂

Sure thing @ash-jc-allen. But I'm a bit occupied for the day. I'll start working on that tomorrow.

from short-url.

ash-jc-allen avatar ash-jc-allen commented on July 17, 2024 1

This feature has now been released as part of v7.3.0 (https://github.com/ash-jc-allen/short-url/releases/tag/v7.3.0) 🙂

from short-url.

ash-jc-allen avatar ash-jc-allen commented on July 17, 2024

Hey @LogicSatinn! This is something that I've thought about myself in the past. I'm not sure what the standard approach to this would usually be.

On the one hand, as you'll already know, it only takes a couple of minutes to extend the models and add the factories.

But, on the other hand, it means that if you're using this approach it might break things like polymorphic relationships in the database. Because you'd be storing App\Models\ShortURL rather than AshAllenDesign\ShortURL\Models\ShortURL.

So I'm pretty open to any suggestions on this one. My main aim for this package is to try and keep it pain-free and easy to use, so I'm happy to take direction from devs (such as yourself) that are using this in their own projects 😄

Do you think that having model factories provided by the package would make things easier?

from short-url.

LogicSatinn avatar LogicSatinn commented on July 17, 2024

@ash-jc-allen It is absolutely necessary if somebody needs to have some tests, and of course, painlessly easy-to-use.

On the other hand, it's also a choice to have some tests while using the package or not.

My point is, we could make things better by providing this feature and also making it a choice. I have already looked into how we could make that happen.

from short-url.

ash-jc-allen avatar ash-jc-allen commented on July 17, 2024

@LogicSatinn Yeah I agree that it could probably make testing a bit easier for anyone using the package. I think I'd class it more as a "nice-to-have" though rather than "absolutely necessary" haha! 😄

I've put a tweet to get other dev's opinions on whether they'd expect a package to provide factories, or whether you should implement them yourselves. I'll wait until I've got a bit more feedback before I go ahead with making any changes. So I'll probably come back to this in a few days.

But if we end up going forward with it, I'd be cool for you to PR the changes 🙂

from short-url.

LogicSatinn avatar LogicSatinn commented on July 17, 2024

@ash-jc-allen Hey Buddy. So, turns out Model Factories is an appreciated feature among the devs. Would you like a PR on this or would you like to do this yourself?

from short-url.

ash-jc-allen avatar ash-jc-allen commented on July 17, 2024

@LogicSatinn Yeah, I agree, it looks like this is something that some people might like. I'm cool with you to make a PR if you'd like? 🙂

from short-url.

Related Issues (20)

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.