Giter VIP home page Giter VIP logo

vocabulary-game's Introduction

Vocabulary Game

Rules

Constraints I had to operate under and more extensive explanation of the game can be found at INSTRUCTIONS.md

Brief Description

This is a simple language game, where user can learn new words (in this particular case, Spanish) just by playing the game over and over again. The game also comes with a 'High score' board where a user can try to beat his/her own record.

How to play the game

git clone [email protected]:codepreneur/vocabulary-game.git
cd vocabulary-game
npm install
bower install
nodemon app.js

Then go to the browser and type http://localhost:3000/home

Testing

There are two kinds of tests in the vocabulary game: Unit tests and End to End tests.

Running Unit Tests

Vocabulary game comes preconfigured with unit tests. These are written in Jasmine, which can be run with the Karma Test Runner. Karma configuration file to run them is provided.

  • the configuration is found at test/karma.conf.js
  • the unit tests are found in test/unit/

The easiest way to run the unit tests is to use this command (and then follow instructions in the terminal):

karma start test/karma.conf.js

This script will start the Karma test runner to execute the unit tests. Moreover, Karma will sit and watch the source and test files for changes and then in order to re-run the tests browser needs to be refreshed.

End to end testing

Vocabulary game comes with end-to-end tests, again written in Jasmine. These tests are run with the Protractor End-to-End test runner. It uses native events and has special features for Angular applications.

  • the configuration is found at test/protractor-conf.js
  • the end-to-end tests are found in test/e2e/

Protractor simulates interaction with our web app and verifies that the application responds correctly. Therefore, our web server needs to be serving up the application, so that Protractor can interact with it.

For that vocabulary game uses local standalone Selenium Server to control browsers, therefore:

webdriver-manager start

Then once the server has booted up, to run end-to-end test simply type:

protractor test/protractor-conf.js

This will execute the end-to-end tests against the application being hosted on the development server (it needs to be running on port 3000).

vocabulary-game's People

Contributors

codepreneur avatar filso 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.