Giter Club home page Giter Club logo

Comments (6)

zbagley avatar zbagley commented on May 13, 2024 3

I'll be working closely with this over the next day or so, and I have a few solid tutorials saved already... but I'll update with the best or what I used. I'm shifting to testing both client and server with Karma + Jasmine.

from angular-full-stack.

zbagley avatar zbagley commented on May 13, 2024

Jasmine is already included in this repo, so there's no need to be using mocha. If you're looking to implement mocha, then you'll want to remove jasmine. Go ahead and check out Jasmine vs. Mocha on google to find several good reads on how they are competing test tools.

from angular-full-stack.

jonatanskogsfors avatar jonatanskogsfors commented on May 13, 2024

Yes, I would prefer to only use one framework. My dabbling with mocha was primarily because I couldn't get jasmine to work on both client and server. And that is te actual question: How should I test the server code?

I would love for this project to include examples of this.

from angular-full-stack.

zbagley avatar zbagley commented on May 13, 2024

Karma + Jasmine is the framework set up for live BDD/TDD. There's quite a few tutorials out there. In this repo all you need to do is type ng test for a basic Karma/Jasmine test.

from angular-full-stack.

jonatanskogsfors avatar jonatanskogsfors commented on May 13, 2024

ng test is all you have to do for client side testing (ng as in Angular) and it's working perfect out of the box. Server side testing however is only performed secondarily by the e2e-tests.

The server code in this project is maybe not worth testing since most logic in handled by mongoose so to showcase server testing there should probably be more server logic.

There is a jungle of tutorials for jasmine but I have not yet found a good one that works with both typescript and nodejs.

There is the module jasmine-node-karma on npm but then you are restricted to jasmine 1.3.1.

from angular-full-stack.

zbagley avatar zbagley commented on May 13, 2024

Just wanted to mention that our server tests are postponed until next week while we work some bugs out, but I haven't forgot.

from angular-full-stack.

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.