Comments (6)
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.
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.
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.
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.
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.
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)
- Error when deploying app to AWS EC2 HOT 3
- list dir tree creation duplicates server folder HOT 1
- Error running dev & prod scripts HOT 1
- body parser package could be removed
- Session Management HOT 3
- JWT token validation is not working HOT 1
- Error while running "npm run dev" command
- After install error HOT 2
- Wildcard instead of controllers?
- How to test the server in Postman HOT 2
- Two mongo connections are opened HOT 4
- Cannot login with prod bundle (working on dev)
- Not able to run on docker compose HOT 2
- How to expose port 80 in production? HOT 2
- Migrate TSLint to ESLint HOT 1
- Fix e2e tests HOT 1
- Update to Angular 12 HOT 1
- Proxy Issue HOT 1
- Upgrade Bootstrap to v5 HOT 3
- Upgrade to Angular v14 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-full-stack.