Giter Club home page Giter Club logo

js-unit-testing-guide's People

Contributors

gabrielchencn avatar iamhughes avatar imaegoo avatar jackkoppa avatar mawrkus 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

js-unit-testing-guide's Issues

Update/improve the "๐Ÿ“™ Resources" section...

Now that the "๐Ÿ“™ Resources" section has been splitted into different topics, it would be nice to populate it with more content. Blog posts, tutorials, videos, books, ... The idea is not to have an encyclopedia but to have a few (5 max. per topic?) high quality resources. Help, anyone?

Use of arrow functions in examples

Thanks for the excellent guide.

It is unclear to me whether the examples are using mocha or jasmine, as both of them use describe(). But I wanted to point out that mocha specifically discourages the use of arrow functions. https://mochajs.org/#arrow-functions

I think it would be helpful to make clear which framework/tooling the examples are using, and if they are indeed using mocha, they should perhaps use function() instead. Thanks.

The usage of `since` would make test reports better readable.

If you take a look at this test case:

describe('A set of functionalities', () => {
  it('should do something nice', () => {
   expect(myVar).toBe(true);
  });
});

if this test fails, then your report will say something along the lines of:

expected undefined to be true

which doesn't mean anything.

Would be much nicer to use Jasmine Custom Messages. Where your tests would start to look like this:

describe('A set of functionalities', () => {
  it('should do something nice', () => {
   since('i have a boolean variable named myVar with a value of true')
      .expect(myVar).toBe(true);
  });
});

And your typical report would read on a failure:

A set of functionalities should do something nice I have a boolean I have a boolean variable named myVar with a value of true FAILED

Basically creating much more approachable error reports that mean something later in the future. And motivating the notion of creating meaningful tests.

What are your thoughts?

Add translations

It would be nice to have the guide translated in the following languages:

  • Chinese (a version from 2020 already exists)
  • Spanish
  • French
  • Portuguese

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.