File tree Expand file tree Collapse file tree 8 files changed +1000
-0
lines changed
Expand file tree Collapse file tree 8 files changed +1000
-0
lines changed Original file line number Diff line number Diff line change 1+ import 'angular2-universal-polyfills' ;
2+ import { assert } from 'chai' ;
3+ import { Counter } from '../components/counter/counter' ;
4+
5+ describe ( 'Counter component' , ( ) => {
6+ it ( 'should start with value 0' , ( ) => {
7+ const instance = new Counter ( ) ;
8+ assert . equal ( instance . currentCount , 0 ) ;
9+ } ) ;
10+
11+ it ( 'should increment the counter by 1 when requested' , ( ) => {
12+ const instance = new Counter ( ) ;
13+ instance . incrementCounter ( ) ;
14+ assert . equal ( instance . currentCount , 1 ) ;
15+ instance . incrementCounter ( ) ;
16+ assert . equal ( instance . currentCount , 2 ) ;
17+ } ) ;
18+ } ) ;
Original file line number Diff line number Diff line change 1+ module . exports = function ( config ) {
2+ config . set ( {
3+ frameworks : [ 'jasmine' , 'chai' ] ,
4+ reporters : [ 'progress' ] ,
5+ logLevel : config . LOG_INFO ,
6+ browsers : [ 'Chrome' ] ,
7+ autoWatch : true ,
8+ autoWatchBatchDelay : 300 ,
9+
10+ files : [
11+ // Note: you must have already run 'webpack --config webpack.config.vendor.js' for this file to exist
12+ './wwwroot/dist/vendor.js' ,
13+
14+ './ClientApp/tests/*.ts' ,
15+ './ClientApp/tests/**/*.ts'
16+ ] ,
17+
18+ preprocessors : {
19+ './ClientApp/tests/*.ts' : [ 'webpack' ] ,
20+ './ClientApp/tests/**/*.ts' : [ 'webpack' ]
21+ } ,
22+
23+ webpack : require ( './webpack.config.js' ) ,
24+ webpackMiddleware : { stats : 'errors-only' }
25+ } ) ;
26+ } ;
Original file line number Diff line number Diff line change 44 "devDependencies" : {
55 "aspnet-webpack" : " ^1.0.6" ,
66 "bootstrap" : " ^3.3.6" ,
7+ "chai" : " ^3.5.0" ,
78 "css-loader" : " ^0.23.1" ,
89 "expose-loader" : " ^0.7.1" ,
910 "extendify" : " ^1.0.0" ,
1011 "extract-text-webpack-plugin" : " ^1.0.1" ,
1112 "file-loader" : " ^0.8.5" ,
13+ "jasmine-core" : " ^2.5.1" ,
1214 "jquery" : " ^2.2.1" ,
15+ "karma" : " ^1.2.0" ,
16+ "karma-chai" : " ^0.1.0" ,
17+ "karma-chrome-launcher" : " ^2.0.0" ,
18+ "karma-jasmine" : " ^1.0.2" ,
19+ "karma-webpack" : " ^1.8.0" ,
1320 "raw-loader" : " ^0.5.1" ,
1421 "style-loader" : " ^0.13.0" ,
1522 "ts-loader" : " ^0.8.1" ,
Original file line number Diff line number Diff line change 1010 },
1111 "es6-shim/es6-shim.d.ts" : {
1212 "commit" : " c0d876601e0f8236fd6b57626eb62c4e485f1563"
13+ },
14+ "chai/chai.d.ts" : {
15+ "commit" : " 15d88ee05780bd6bbc4e376c5202b160895017f5"
16+ },
17+ "assertion-error/assertion-error.d.ts" : {
18+ "commit" : " 15d88ee05780bd6bbc4e376c5202b160895017f5"
19+ },
20+ "jasmine/jasmine.d.ts" : {
21+ "commit" : " 15d88ee05780bd6bbc4e376c5202b160895017f5"
1322 }
1423 }
1524}
Original file line number Diff line number Diff line change 1+ // Type definitions for assertion-error 1.0.0
2+ // Project: https://github.com/chaijs/assertion-error
3+ // Definitions by: Bart van der Schoor <https://github.com/Bartvds>
4+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+ declare module 'assertion-error' {
7+ class AssertionError implements Error {
8+ constructor ( message : string , props ?: any , ssf ?: Function ) ;
9+ name : string ;
10+ message : string ;
11+ showDiff : boolean ;
12+ stack : string ;
13+ }
14+ export = AssertionError ;
15+ }
You can’t perform that action at this time.
0 commit comments