Giter Site home page Giter Site logo

angular-dart-board's Introduction

🎯 Dart game - Angular testing exercices

Dart gif

Goal

The goal of this coding dojo is to improve testing skills of your team with Angular with fun !

Prerequisites

At least, team members should know about test doubles. It's a good idea to introduce, clearly and in a concise way, test doubles your team.

Difference between stubs, mocks, fakes and spies

Getting started

  1. Go to project folder and install dependencies:
npm install
  1. Verify that everything is OK by running the test
npm test
  1. Launch development server, and open localhost:4200 in your browser:
npm start

Coding dojo

1️ - Component testing

DartBoardComponent

it should have n target zones
it should have 20 numbers
it should have numbers from 1 to 20
it should have triple target zone
it should have double target zone
it should have one 50 and 25 target zones

2 - Component testing with a depencency

DartScorePopupComponent

it should have default values on init
it should have 20 numbers around
it should show a score of n for 500ms

3 - Service testing

DartBoardHitEventService

it should emit a score of n

4 - Bonus ✨

Create a new component to show the score in real time Dart comes with a lot of game mode. Try coding the 501 one. Each hit will decrease the score. The winner will be the one who reaches 0.

Use this CSS for the score :

.score {
  font-family: scoreboard;
  font-size: 3.25rem;
  color: white;
  user-select: none;
}

Enjoy !

This project was generated with ngX-Rocket version 11.0.0

angular-dart-board's People

Contributors

jonathanmza avatar

Watchers

 avatar  avatar

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.