File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ module . exports = function ( config ) {
2+ config . set ( {
3+ frameworks : [ 'mocha' , 'power-assert' ] ,
4+
5+ files : [
6+ 'test/*.js'
7+ ] ,
8+
9+ client : {
10+ assert : {
11+ output : {
12+ maxDepth : 2
13+ }
14+ }
15+ } ,
16+
17+ preprocessors : {
18+ 'test/**/*.spec.js' : [ 'espower' ]
19+ } ,
20+
21+ browsers : process . env . TRAVIS ? [ 'Firefox' ] : [ 'Chrome' ] ,
22+
23+ singleRun : true
24+ } )
25+ }
Original file line number Diff line number Diff line change 1+ describe ( 'client.assert' , function ( ) {
2+ var orininalAssert = assert ;
3+
4+ describe ( '.output.maxDepth' , function ( ) {
5+ beforeEach ( 'put fixtures' , function ( ) {
6+ this . foo = { flag : true } ;
7+ this . bar = { }
8+ } )
9+
10+ afterEach ( function ( ) {
11+ assert = orininalAssert ;
12+ } )
13+
14+ it ( 'should be 2 as the customized value in karma.conf.js' , function ( ) {
15+ var expected = [ this . foo ]
16+ var actual = [ this . bar ]
17+ try {
18+ assert . deepEqual ( expected , actual )
19+ } catch ( e ) {
20+ var error = e . message
21+ var message = [
22+ ' # adapter.spec.js:18' ,
23+ ' ' ,
24+ ' assert.deepEqual(expected, actual)' ,
25+ ' | | ' ,
26+ ' | [Object{}]' ,
27+ ' [Object{flag:true}]' ,
28+ ''
29+ ] . join ( '\n' ) + ' '
30+ assert . deepEqual ( error , message )
31+ }
32+ } )
33+ } )
34+ } )
You can’t perform that action at this time.
0 commit comments