Giter Site home page Giter Site logo

Comments (21)

thangngoc89 avatar thangngoc89 commented on July 28, 2024 1

I usually use AVA. It was built with parralism and es6 in mind

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

mocha-parallel/mocha-parallel-tests#53

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

Initially, this project was using Ava but I had to switch to mocha because I couldn't get chaijs to work with mocha

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

I also like the cleaner output of mocha.

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

But if we can get these things with Ava, lets migrate to it.

from popcorn-time-desktop.

thangngoc89 avatar thangngoc89 commented on July 28, 2024

Ok. That's cool. Can you be more specific sbot what you can't do with ava?

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

It's helpful to have the tests output in an ordered 'list', like they do in mocha.

from popcorn-time-desktop.

thangngoc89 avatar thangngoc89 commented on July 28, 2024

I played around with Jest for a few day. So far so good, it uses expect as it assert library so no change on tests file. And with Jest 14, they released a killer feature: Snapshot testing with React

http://facebook.github.io/jest/blog/2016/07/27/jest-14.html

I suggest you give it a try

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

This should be a planned feature but at the moment i dont think its very urgent. When this project is stable i think we should migrate add screenshot tests to all the component tests.

from popcorn-time-desktop.

thangngoc89 avatar thangngoc89 commented on July 28, 2024

we should migrate add screenshot tests to all the component tests.

Agreed. Visual testing is slow and error prone.

I forgot to mention, Jest can run test in parallel by default

from popcorn-time-desktop.

onbjerg avatar onbjerg commented on July 28, 2024

@amilajack You can get mocha-like output from ava. Remember that ava is TAP-compatible, so you can use any TAP reporter.

This was probably the one you were looking for.

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

@onbjerg Can I have nested tests like this:

describe('Some', () => {
  describe('Another', () => {
    it('should test Foo', () => {
      // Some test here
    })
  })
})

from popcorn-time-desktop.

onbjerg avatar onbjerg commented on July 28, 2024

Not really. I agree with sindre that it is sort of an anti-pattern and should be discouraged. The most you can do is:

import test from 'ava'

test('something', (t) => {
  t.is(1, 1, '1 is 1')
})

Regardless, the thing you're asking was/is being discussed in avajs/ava#222.

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

Can chai be used with ava?

from popcorn-time-desktop.

onbjerg avatar onbjerg commented on July 28, 2024

Actually, scratch that. There's a package for that(tm): https://github.com/sheerun/ava-spec.

Can chai be used with ava?

Yes. But you might want to read a bit more about it here, as there are some trade-offs: Custom assertions.

Also, read avajs/ava#25 (which is linked in that section of the README), since the trade off might not be a deal-breaker overall.

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

I see. All our tests are already written in mocha. It would be worth he migration to ava if it supported running tests on multiple threads. At the moment tho there are a bunch of architectural concerns with the project that need attention right now. Are you interested in contributing? 😁

from popcorn-time-desktop.

onbjerg avatar onbjerg commented on July 28, 2024

It runs tests in parallel per default.

I might be up for contributing 🍇

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

Yesss! 🔥🎉😁

What areas are you experienced in? Node? React? Redux? etc

from popcorn-time-desktop.

onbjerg avatar onbjerg commented on July 28, 2024

Been doing Node for a few years, been doing React/Redux for a year or so 😬 I'm experienced in a lot of other things, too, but I don't think they apply to this project.

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

That's great! Also I invited you to the gitter. I just commented an introduction to the project. Would recommend checking that out.

from popcorn-time-desktop.

amilajack avatar amilajack commented on July 28, 2024

@onbjerg just looked into jest and it looks very promising. What do you think about PR'ing for this? 😀

from popcorn-time-desktop.

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.