Giter Club home page Giter Club logo

Comments (8)

JGulbronson avatar JGulbronson commented on September 9, 2024

Jasmine looks good, I'll take a look at it

from rmc.

divad12 avatar divad12 commented on September 9, 2024

I believe @phleet likes http://visionmedia.github.io/mocha/. Any thoughts, Jamie?

from rmc.

jlfwong avatar jlfwong commented on September 9, 2024

Currently favored setup:

  • Mocha for test runner, using the BDD syntax.
  • chaijs for assertions, using the expect() syntax.
  • sinonjs for mocking (though I need to use this very infrequently, and when I do it's usually to mock ajax requests)

The hard thing for JavaScript testing is keeping the test in good working order. This is facilitated in our python codebase by making make test a deploy blocker (you cannot deploy if the tests are failing). It turns out that making client-side JavaScript tests report back to the console with their success or failure is a huge pain (this was what I spent 2 months at two different companies doing). Thankfully we already have a module system (RequireJS) which makes part of this challenge go away.

The most consistently applied tool I've seen for this is Karma, though I haven't used it much personally. I ended up using either PhantomJS or backgrounded Google Chrome windows in the past for doing this kind of thing, and rolling my own system to support it.

from rmc.

JGulbronson avatar JGulbronson commented on September 9, 2024

So if I'm correct right now we're looking to test the transcript and schedule parsers. I'll check out Mocha and chaijs, as well as the current parser for transcripts and see if I can come up with some tests we can run.

Is there any other Javascript code we should be testing aside from the parser?

from rmc.

jlfwong avatar jlfwong commented on September 9, 2024

Tons, but don't worry about that for now :)

from rmc.

JGulbronson avatar JGulbronson commented on September 9, 2024

Haha sounds good, looks like getting the tests for this will take me a little bit anyway, especially given the 3 exams in 3 days I have starting tomorrow 👎 Good study break though. I'll start with the transcript parser since that code seems for manageable right now.

from rmc.

divad12 avatar divad12 commented on September 9, 2024

Oh man. Good luck on the exams!

from rmc.

JGulbronson avatar JGulbronson commented on September 9, 2024

👍 Thanks David, looking forward to Wednesday night trust me

from rmc.

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.