Git Product home page Git Product logo

23-testing-controllers's Introduction

cf Lab 23 - Testing Angular Controllers

To Submit this Assignment

  • create a new branch and work off of the same fork that you made on Monday
  • push to your repository
  • submit a pull request to this repository
  • submit a link to your PR in canvas
  • write a question and observation on canvas

Include

  • .eslintrc
  • .babelrc
  • .gitignore
  • package.json
    • create an npm watch script for running webpack-dev-server --inline --hot
    • create an npm lint script for linting your JS with eslint
    • create an npm test script for running karma and all associated tests
    • create an npm test-watch script for running karma on file system changes
  • ignore the build directory
  • webpack.config.js
  • karma.config.js

Description

  • Use the karma init karma.conf.js CLI tool to generate a new karma configuration file

    • include this file in your assignment submission
  • Write a test that checks for default properties set by your controller(s)

  • Write a series of tests that check your controller methods for expected functionality

  • Use the following segments of code (this is all you need) to update your webpack.config.js so that you have the ability to see the source-maps for your resources in the Chrome dev tools.


  devtool: 'source-map'

  new ExtractTextPlugin({filename: 'bundle.css'})

  use: ExtractTextPlugin.extract(
    {
      use: [
        { loader: 'css-loader',  options: { sourceMap: true } },
        {
          loader: 'sass-loader',
          options: {
            sourceMap: true,
            includePaths: [`${__dirname}/app/scss/`]
          }
        },
      ]
    }
  )

Bonus

  • 2pts: Create a series of scss partials for your _base styles, _reset stylesheet, and _main styles
    • these should be imported (@import) into a core.scss file that will be compiled into a stylesheet for your application

23-testing-controllers's People

Contributors

silvershotm1 avatar christophersclosser avatar sjschmidt44 avatar jessicamvs avatar

Watchers

James Cloos 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.