Coder Social home page Coder Social logo

Add some tests about torrentflix HOT 9 OPEN

ahivert avatar ahivert commented on June 9, 2024
Add some tests

from torrentflix.

Comments (9)

ItzBlitz98 avatar ItzBlitz98 commented on June 9, 2024

Please forgive my ignorance but what tests would we run and how would they benefit Torrentflix ?

from torrentflix.

ahivert avatar ahivert commented on June 9, 2024

During my last PR, I change lot of lines of code and generate error because of this change. Actually, after each change on code, we need to test manually each feature which growing.
So I ask if we could add some writing test which we launch after each development. With this we avoid regression of code with launching one command (example : tape tests/*.js).

This tests, are files where we put some code to test functions. For example :

  • I want to be alerted when my scrapers script not working anymore (website which change html)
  • I want to be alerted when a function not work (torrentflix -s title, torrentflix -o title...)

This test can be launch manually but automatically with travis (at each push for example)

from torrentflix.

pechitook avatar pechitook commented on June 9, 2024

I agree we need testing to start placing/accepting PRs with more confidence. I do not have much experience with testing in JS specifically, but once the initial architecture is set (testing framework chosen, some base tests as example) I could also contribute to this.

I'm not sure how we could structure the two files @ahivert mentions, but I also believe they need some refactoring and further extraction into new modules. If we can do that and at the same time prepare the ground to make that code testable, it would be a great first step.

from torrentflix.

ItzBlitz98 avatar ItzBlitz98 commented on June 9, 2024

I don't have much experience in testing but i'm not opposed to this, I think its a great idea and i might learn something in the process.

from torrentflix.

 avatar commented on June 9, 2024

i organizied the 'search for torrent' function into a separated project just for fun and trying nodejs. I think it's more convenient to write unit test if a module does only a very well defined and limited functionality.
I'll try jasminejs as i read its one of the most renowned nodejs testing framework and can work with es6 classes and babeljs.

from torrentflix.

ahivert avatar ahivert commented on June 9, 2024

I don't think this is a good idea to add a layer on top of javascript in this little size app. We need to keep the code readable.
We add a layer when we need to simplify the writing to save time in a big project (learn layer take time), again, maybe I'm wrong ? 😊
For the testing framework, there is "Tape" too, which seem to be very good, easy too learn and use. Very good for an open source project like this.

from torrentflix.

 avatar commented on June 9, 2024

My personal preference is to write reusable code.. It's your project guys :)

from torrentflix.

amilajack avatar amilajack commented on June 9, 2024

I'm willing to make a PR for this. Some of the endoints (Kickass) is not usable.

from torrentflix.

ItzBlitz98 avatar ItzBlitz98 commented on June 9, 2024

Thanks for the PR, I'm going to work on updating scrapers they haven't seen much attention lately.

from torrentflix.

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.