Code Monkey home page Code Monkey logo

scrabble-jasmine-baseline's Introduction

Backbone Scrabble / Testing JavaScript with Jasmine

An assignment completed during my time as a student at Ada Developers Academy.

Assignment instructions below.

Introduction

This project contains an implementation of our classic Scrabble project, this time as a Backbone single-page-application. We'll use it to demonstrate the fundamentals of testing JavaScript with Jasmine. It is built on top of the standard Ada WebPack setup.

This is an individual exercise. Collaboration is of course welcome, but each of you should write your own code. No PR is required for this exercise.

Learning Goals

  • Write tests in JavaScript using Jasmine
  • Run a test suite using npm

Setup

Installation

git clone <projct url>
cd scrabble-jasmine-baseline
npm install

Run the Server

npm start

Check out the application's features at localhost:8081.

Run the Tests

npm test

Exercise: Testing Scrabble

Start by spending some time reading through the code.

  • How is the application set up, and what are the main workflows?
  • How is this similar to Backbone projects you've written in the past?
  • How does this code compare to your previous Scrabble implementation?

All of the view code for this application should already be functional - you shouldn't need to change anything under src/views, src/app.js, or build.

One of the big differences with previous Backbone projects is the amount of logic contained in the models. Both Word and WordList have several complex helper functions.

Your job is to use a test-driven development workflow to write the incomplete methods in this project. In particular, you'll need to test and implement:

  • Word.score()
  • WordList.highestScoringWord()
  • WordList.totalScore()

While all tests should be written from scratch, once you've got them you should feel free to borrow the function code from previous projects. The learning goal here is to get experience testing JavaScript via Jasmine, not to practice implementing Scrabble for the third time.

scrabble-jasmine-baseline's People

Contributors

add2point71dots avatar hamled avatar kariabancroft avatar

Watchers

 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.