Skip to content

tomastrajan/angular-js-es6-testing-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

40560e5 · Jan 10, 2019

History

47 Commits
Feb 9, 2016
Jan 15, 2016
Dec 12, 2016
Feb 9, 2016
Aug 16, 2015
Jan 16, 2016
Jan 16, 2016
Aug 16, 2015
Feb 21, 2017
Dec 20, 2016
Jan 9, 2019
Jan 9, 2019
Oct 4, 2015
Mar 4, 2017
Jan 16, 2016

Repository files navigation

Angular JS 1.5 - ES6 Module Unit testing and Karma Integration testing seed by @tomastrajan Build Status

Great seed for enterprise projects with heavy focus on unit and integration testing.

This repository contains two releases:

  1. 1.4.0 - for Angular JS 1.4 and lower (uses Component Pattern for Angular JS)
  2. 1.5.0 - for Angular JS 1.5 and above which supports native .component(name, options) API

Info

Components

Getting started

  1. Clone repository git clone https://github.com/tomastrajan/angular-js-es6-testing-example.git
  2. Enter project directory cd angular-js-es6-testing-example
  3. Install dependencies npm i or npm install

Scripts

All scripts are run with npm run [script], for example: npm run test.

  • start - start development server, try it by opening http://localhost:8081/webpack-dev-server/index.html

  • build - create dev build, check build directory

  • dist - create production build, check dist directory

  • server_build - serve content from build directory

  • server_dist - serve content from dist directory

  • lint - lint code (with ESLint)

  • mocha - run all unit tests (with Mocha)

  • watch - run and watch all unit tests (with Mocha)

  • karma - run all integration tests (with Karma / Jasmine)

  • test - lint code and run all tests (with Mocha and Karma)

  • ci - for Travis CI

Tests

For more detailed info about tests check the original blog post.

  • *.test.js - mocha unit tests
  • *.integration.test.js - mocha integration tests (manual)
  • *.spec.js - karma integration tests (spin up Angular JS app context)