This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree 8 files changed +1000
-0
lines changed 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 4
4
"devDependencies" : {
5
5
"aspnet-webpack" : " ^1.0.6" ,
6
6
"bootstrap" : " ^3.3.6" ,
7
+ "chai" : " ^3.5.0" ,
7
8
"css-loader" : " ^0.23.1" ,
8
9
"expose-loader" : " ^0.7.1" ,
9
10
"extendify" : " ^1.0.0" ,
10
11
"extract-text-webpack-plugin" : " ^1.0.1" ,
11
12
"file-loader" : " ^0.8.5" ,
13
+ "jasmine-core" : " ^2.5.1" ,
12
14
"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" ,
13
20
"raw-loader" : " ^0.5.1" ,
14
21
"style-loader" : " ^0.13.0" ,
15
22
"ts-loader" : " ^0.8.1" ,
Original file line number Diff line number Diff line change 10
10
},
11
11
"es6-shim/es6-shim.d.ts" : {
12
12
"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"
13
22
}
14
23
}
15
24
}
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