- fall back to Object.prototype.toString (slower)
77 | @isFunction = (value) -> !!value and toString.call(value) is '[object Function]'
78 | else
79 | @isFunction = (value) -> !!value and typeof value is 'function'
80 |
81 | Deft.isFunction = @isFunction
82 |
83 | return
84 | )
--------------------------------------------------------------------------------
/packages/deft/src/js/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deftjs/DeftJS/bf5304773826b413fe54fa0804bc8f6410056797/packages/deft/src/js/.gitkeep
--------------------------------------------------------------------------------
/packages/deft/test/TestRunner.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Deft JS Test Suite
6 |
7 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
174 |
175 |
186 |
187 |
188 |
189 |
190 |
Choose Target Framework:
191 |
213 |
214 |
215 |
216 |
217 |
218 |
--------------------------------------------------------------------------------
/packages/deft/test/build.properties:
--------------------------------------------------------------------------------
1 | karma.browsers=Chrome,Safari,Firefox
--------------------------------------------------------------------------------
/packages/deft/test/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/packages/deft/test/coffee/custom-assertions.coffee:
--------------------------------------------------------------------------------
1 | ###
2 | Copyright (c) 2013 [DeftJS Framework Contributors](http://deftjs.org)
3 | Open source under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).
4 | ###
5 |
6 | describe( 'Custom Assertions', ->
7 |
8 | specify( 'memberOf', ->
9 | expect( 1 ).to.be.a.memberOf( [ 1, 2, 3 ] )
10 | expect( 0 ).not.to.be.a.memberOf( [ 1, 2, 3 ] )
11 | return
12 | )
13 |
14 | specify( 'membersOf', ->
15 | expect( [ 1 ] ).to.be.membersOf( [ 1, 2, 3 ] )
16 | expect( [ 1, 2 ] ).to.be.membersOf( [ 1, 2, 3 ] )
17 | expect( [ 0 ] ).not.to.be.membersOf( [ 1, 2, 3 ] )
18 | expect( [ 0, 5 ] ).not.to.be.membersOf( [ 1, 2, 3 ] )
19 | return
20 | )
21 |
22 | specify( 'unique', ->
23 | expect( [ 1, 2, 3 ] ).to.be.unique
24 | expect( [ 1, 2, 1 ] ).not.to.be.unique
25 | return
26 | )
27 |
28 | specify( 'eventuallyThrow', ( done ) ->
29 | @slow( 250 )
30 | setTimeout(
31 | ->
32 | throw new Error( 'error message' )
33 | 0
34 | )
35 | assert.eventuallyThrows( new Error( 'error message' ), done, 100 )
36 | return
37 | )
38 |
39 | return
40 | )
--------------------------------------------------------------------------------
/packages/deft/test/coffee/log/Logger.coffee:
--------------------------------------------------------------------------------
1 | ###
2 | Copyright (c) 2012 [DeftJS Framework Contributors](http://deftjs.org)
3 | Open source under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).
4 | ###
5 |
6 | describe( 'Deft.log.Logger', ->
7 |
8 | describe( 'log()', ->
9 |
10 | if Ext.getVersion( 'extjs' )?
11 | # Ext JS
12 |
13 | describe( 'logs a message with the specified priority', ->
14 | logFunction = null
15 |
16 | beforeEach( ->
17 | logFunction = sinon.stub( Ext, 'log' )
18 | return
19 | )
20 |
21 | afterEach( ->
22 | logFunction.restore()
23 | return
24 | )
25 |
26 | specify( 'no priority specified', ->
27 | Deft.Logger.log( 'message', 'info' )
28 |
29 | expect( logFunction ).to.be.calledOnce.and.calledWith( { level: 'info', msg: 'message' } )
30 | return
31 | )
32 |
33 | specify( 'verbose', ->
34 | Deft.Logger.log( 'message', 'verbose' )
35 |
36 | expect( logFunction ).to.be.calledOnce.and.calledWith( { level: 'info', msg: 'message' } )
37 | return
38 | )
39 |
40 | specify( 'deprecate', ->
41 | Deft.Logger.log( 'message', 'deprecate' )
42 |
43 | expect( logFunction ).to.be.calledOnce.and.calledWith( { level: 'warn', msg: 'message' } )
44 | return
45 | )
46 |
47 | specify( 'warn', ->
48 | Deft.Logger.log( 'message', 'warn' )
49 |
50 | expect( logFunction ).to.be.calledOnce.and.calledWith( { level: 'warn', msg: 'message' } )
51 | return
52 | )
53 |
54 | specify( 'error', ->
55 | Deft.Logger.log( 'message', 'error' )
56 |
57 | expect( logFunction ).to.be.calledOnce.and.calledWith( { level: 'error', msg: 'message' } )
58 | return
59 | )
60 |
61 | return
62 | )
63 |
64 | else
65 | # Sencha Touch
66 |
67 | describe( 'logs a message with the specified priority, when Ext.Logger is available', ->
68 | logFunction = null
69 |
70 | beforeEach( ->
71 | if not Ext.Logger?
72 | Ext.define( 'Ext.Logger',
73 | singleton: true
74 | log: Ext.emptyFn
75 | isMock: true
76 | )
77 | logFunction = sinon.stub( Ext.Logger, 'log' )
78 | )
79 |
80 | afterEach( ->
81 | logFunction.restore()
82 | if Ext.Logger.isMock
83 | Ext.Logger = null
84 | )
85 |
86 | specify( 'no priority specified', ->
87 | Deft.Logger.log( 'message', 'info' )
88 |
89 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'info' )
90 | return
91 | )
92 |
93 | specify( 'verbose', ->
94 | Deft.Logger.log( 'message', 'verbose' )
95 |
96 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'verbose' )
97 | return
98 | )
99 |
100 | specify( 'info', ->
101 | Deft.Logger.log( 'message', 'info' )
102 |
103 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'info' )
104 | return
105 | )
106 |
107 | specify( 'deprecate', ->
108 | Deft.Logger.log( 'message', 'deprecate' )
109 |
110 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'deprecate' )
111 | return
112 | )
113 |
114 | specify( 'warn', ->
115 | Deft.Logger.log( 'message', 'warn' )
116 |
117 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'warn' )
118 | return
119 | )
120 |
121 | specify( 'error', ->
122 | Deft.Logger.log( 'message', 'error' )
123 |
124 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'error' )
125 | return
126 | )
127 |
128 | return
129 | )
130 |
131 | describe( 'silently ignores messages when Ext.Logger is unavailable', ->
132 | logger = null
133 |
134 | beforeEach( ->
135 | logger = Ext.Logger
136 | Ext.Logger = null
137 | return
138 | )
139 |
140 | afterEach( ->
141 | Ext.Logger = logger
142 | return
143 | )
144 |
145 | specify( 'no priority specified', ->
146 | expect( -> Deft.Logger.log( 'message', 'info' ) ).to.not.throw( Error )
147 | return
148 | )
149 |
150 | specify( 'verbose', ->
151 | expect( -> Deft.Logger.log( 'message', 'verbose' ) ).to.not.throw( Error )
152 | return
153 | )
154 |
155 | specify( 'deprecate', ->
156 | expect( -> Deft.Logger.log( 'message', 'deprecate' ) ).to.not.throw( Error )
157 | return
158 | )
159 |
160 | specify( 'warn', ->
161 | expect( -> Deft.Logger.log( 'message', 'warn' ) ).to.not.throw( Error )
162 | return
163 | )
164 |
165 | specify( 'error', ->
166 | expect( -> Deft.Logger.log( 'message', 'error' ) ).to.not.throw( Error )
167 | return
168 | )
169 |
170 | return
171 | )
172 | )
173 |
174 | describe( 'verbose()', ->
175 | logFunction = null
176 |
177 | beforeEach( ->
178 | logFunction = sinon.stub( Deft.Logger, 'log' )
179 | )
180 |
181 | afterEach( ->
182 | logFunction.restore()
183 | )
184 |
185 | specify( 'calls log() with specified message with verbose priority', ->
186 | Deft.Logger.verbose( 'message' )
187 |
188 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'verbose' )
189 | return
190 | )
191 |
192 | return
193 | )
194 |
195 | describe( 'info()', ->
196 | logFunction = null
197 |
198 | beforeEach( ->
199 | logFunction = sinon.stub( Deft.Logger, 'log' )
200 | )
201 |
202 | afterEach( ->
203 | logFunction.restore()
204 | )
205 |
206 | specify( 'calls log() with specified message with info priority', ->
207 | Deft.Logger.info( 'message' )
208 |
209 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'info' )
210 | return
211 | )
212 |
213 | return
214 | )
215 |
216 | describe( 'deprecate()', ->
217 | logFunction = null
218 |
219 | beforeEach( ->
220 | logFunction = sinon.stub( Deft.Logger, 'log' )
221 | )
222 |
223 | afterEach( ->
224 | logFunction.restore()
225 | )
226 |
227 | specify( 'calls log() with specified message with deprecate priority', ->
228 | Deft.Logger.deprecate( 'message' )
229 |
230 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'deprecate' )
231 | return
232 | )
233 |
234 | return
235 | )
236 |
237 | describe( 'warn()', ->
238 | logFunction = null
239 |
240 | beforeEach( ->
241 | logFunction = sinon.stub( Deft.Logger, 'log' )
242 | )
243 |
244 | afterEach( ->
245 | logFunction.restore()
246 | )
247 |
248 | specify( 'calls log() with specified message with warn priority', ->
249 | Deft.Logger.warn( 'message' )
250 |
251 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'warn' )
252 | return
253 | )
254 |
255 | return
256 | )
257 |
258 | describe( 'error()', ->
259 | logFunction = null
260 |
261 | beforeEach( ->
262 | logFunction = sinon.stub( Deft.Logger, 'log' )
263 | )
264 |
265 | afterEach( ->
266 | logFunction.restore()
267 | )
268 |
269 | specify( 'calls log() with specified message with error priority', ->
270 | Deft.Logger.error( 'message' )
271 |
272 | expect( logFunction ).to.be.calledOnce.and.calledWith( 'message', 'error' )
273 | return
274 | )
275 |
276 | return
277 | )
278 |
279 | return
280 | )
--------------------------------------------------------------------------------
/packages/deft/test/coffee/util/Function.coffee:
--------------------------------------------------------------------------------
1 | ###
2 | Copyright (c) 2012 [DeftJS Framework Contributors](http://deftjs.org)
3 | Open source under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).
4 | ###
5 |
6 | describe( 'Deft.util.Function', ->
7 |
8 | describe( 'memoize()', ->
9 | fibonacci = ( n ) ->
10 | ( if n < 2 then n else fibonacci( n - 1 ) + fibonacci( n - 2 ) )
11 |
12 | sum = ->
13 | Ext.Array.toArray( arguments ).reduce(
14 | ( total, value ) -> total + value
15 | 0
16 | )
17 |
18 | specify( 'returns a new function that wraps the specified function (omitting the optional scope and hash function parameters) and caches the results for previously processed inputs', ->
19 | targetFunction = sinon.spy( fibonacci )
20 |
21 | memoFunction = Deft.util.Function.memoize( targetFunction )
22 |
23 | expect( memoFunction( 12 ) ).to.equal( fibonacci( 12 ) )
24 | expect( memoFunction( 12 ) ).to.equal( fibonacci( 12 ) )
25 | expect( targetFunction ).to.be.calledOnce.and.calledOn( window )
26 |
27 | return
28 | )
29 |
30 | specify( 'returns a new function that wraps the specified function (to be executed in the scope specified via the scope parameter) and caches the results for previously processed inputs', ->
31 | targetScope = {}
32 | targetFunction = sinon.spy( fibonacci )
33 |
34 | memoFunction = Deft.util.Function.memoize( targetFunction, targetScope )
35 |
36 | expect( memoFunction( 12 ) ).to.equal( fibonacci( 12 ) )
37 | expect( memoFunction( 12 ) ).to.equal( fibonacci( 12 ) )
38 | expect( targetFunction ).to.be.calledOnce.and.calledOn( targetScope )
39 |
40 | return
41 | )
42 |
43 | specify( 'supports memoizing functions that take multiple parameters using a hash function (specified via an optional parameter) to produce a unique caching key for those parameters', ->
44 | targetScope = {}
45 | targetFunction = sinon.spy( sum )
46 | hashFunction = sinon.spy( ( a, b, c ) -> Ext.Array.toArray( arguments ).join( '|' ) )
47 |
48 | memoFunction = Deft.util.Function.memoize( targetFunction, targetScope, hashFunction )
49 |
50 | expect( memoFunction( 1, 2, 3 ) ).to.equal( sum( 1, 2, 3 ) )
51 | expect( memoFunction( 1, 2, 3 ) ).to.equal( sum( 1, 2, 3 ) )
52 | expect( hashFunction ).to.be.calledTwice.and.calledOn( targetScope )
53 | expect( targetFunction ).to.be.calledOnce.and.calledOn( targetScope )
54 |
55 | return
56 | )
57 |
58 | return
59 | )
60 |
61 | describe( 'nextTick()', ->
62 |
63 | specify( 'schedules the specified function to be executed in the next turn of the event loop', ( done ) ->
64 | targetFunction = sinon.stub()
65 |
66 | Deft.util.Function.nextTick( targetFunction )
67 |
68 | setTimeout(
69 | ->
70 | expect( targetFunction ).to.be.calledOnce
71 | done()
72 | return
73 | 0
74 | )
75 | return
76 | )
77 |
78 | specify( 'schedules the specified functionto be executed in the specified scope in the next turn of the event loop', ( done ) ->
79 | targetScope = {}
80 | targetFunction = sinon.stub()
81 |
82 | Deft.util.Function.nextTick( targetFunction, targetScope )
83 |
84 | setTimeout(
85 | ->
86 | expect( targetFunction ).to.be.calledOnce.and.calledOn( targetScope )
87 | done()
88 | return
89 | 0
90 | )
91 | return
92 | )
93 |
94 | specify( 'schedules the specified functionto be executed in the specified scope with the specified parameters in the next turn of the event loop', ( done ) ->
95 | targetScope = {}
96 | targetFunction = sinon.stub()
97 |
98 | Deft.util.Function.nextTick( targetFunction, targetScope, [ 'a', 'b','c' ] )
99 |
100 | setTimeout(
101 | ->
102 | expect( targetFunction ).to.be.calledOnce.and.calledOn( targetScope )
103 | expect( targetFunction ).to.be.calledOnce.and.calledWith( 'a', 'b','c' )
104 | done()
105 | return
106 | 0
107 | )
108 | return
109 | )
110 |
111 | return
112 | )
113 |
114 | describe( 'spread()', ->
115 |
116 | specify( 'creates a new wrapper function that spreads the passed Array over the target function arguments', ->
117 | targetFunction = sinon.spy( ( a, b, c ) -> "#{a},#{b},#{c}" )
118 |
119 | wrapperFunction = Deft.util.Function.spread( targetFunction )
120 |
121 | expect( Ext.isFunction( wrapperFunction ) ).to.be.true
122 | expect( wrapperFunction( [ 'a', 'b','c' ] ) ).to.equal( 'a,b,c' )
123 | expect( targetFunction ).to.be.calledOnce.and.calledWith( 'a', 'b', 'c' )
124 |
125 | return
126 | )
127 |
128 | specify( 'creates a new wrapper that fails when passed a non-Array', ->
129 | targetFunction = sinon.stub()
130 |
131 | wrapperFunction = Deft.util.Function.spread( targetFunction )
132 |
133 | expect( Ext.isFunction( wrapperFunction ) ).to.be.true
134 | expect( -> wrapperFunction( 'value' ) ).to.throw( Error, 'Error spreading passed Array over target function arguments: passed a non-Array.' )
135 | expect( targetFunction ).not.to.be.called
136 |
137 | return
138 | )
139 |
140 | return
141 | )
142 |
143 | return
144 | )
--------------------------------------------------------------------------------
/packages/deft/test/js/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deftjs/DeftJS/bf5304773826b413fe54fa0804bc8f6410056797/packages/deft/test/js/.gitkeep
--------------------------------------------------------------------------------
/packages/deft/test/karma/ext/4.0.7.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/ext-4.0.7-gpl/ext-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/ext/4.0.7'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/ext/4.1.0.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/ext/4.1.0'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/ext/4.1.1a.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/ext-4.1.1a-gpl/ext-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/ext/4.1.1a'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
101 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/ext/4.2.0.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/ext-4.2.0-gpl/ext-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/ext/4.2.0'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/ext/4.2.1.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.com/ext/gpl/4.2.1/ext-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/ext/4.2.1'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/touch/2.0.1.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/touch/sencha-touch-2.0.1/sencha-touch-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/touch/2.0.1'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/touch/2.1.0.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/touch/sencha-touch-2.1.0/sencha-touch-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/touch/2.1.0'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/touch/2.1.1.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/touch/sencha-touch-2.1.1/sencha-touch-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/touch/2.1.1'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
101 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/touch/2.2.0.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/touch/sencha-touch-2.2.0/sencha-touch-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/touch/2.2.0'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/touch/2.2.1.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/touch/sencha-touch-2.2.1/sencha-touch-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/touch/2.2.1'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/karma/touch/2.3.0.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Mon Jan 20 2014 05:41:33 GMT-0500 (EST)
3 |
4 | module.exports = function(config) {
5 | config.set({
6 |
7 | // base path, that will be used to resolve files and exclude
8 | basePath: '../../..',
9 |
10 |
11 | // frameworks to use
12 | frameworks: ['mocha'],
13 |
14 |
15 | // list of files / patterns to load in the browser
16 | files: [
17 | 'http://cdn.sencha.io/touch/sencha-touch-2.3.0/sencha-touch-all.js',
18 | 'build/deft-debug.js',
19 |
20 | 'test/lib/chai-1.8.1/chai.js',
21 | 'test/lib/sinon-1.7.3/sinon.js',
22 | 'test/lib/sinon-chai-2.4.0/sinon-chai.js',
23 | 'test/lib/sinon-sencha-1.0.0/sinon-sencha.js',
24 |
25 | 'test/support/browser.js',
26 | 'test/support/custom-assertions.js',
27 |
28 | 'test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js',
29 | 'test/lib/chai-as-promised-4.1.0/chai-as-promised.js',
30 |
31 | 'test/js/custom-assertions.js',
32 |
33 | 'test/js/util/Function.js',
34 | 'test/js/log/Logger.js',
35 | 'test/js/ioc/Injector.js',
36 | 'test/js/mixin/Injectable.js',
37 | 'test/js/mixin/Controllable.js',
38 | 'test/js/mvc/ViewController.js',
39 | 'test/lib/promises-aplus-tests-2.0.3/promises-aplus-tests.js',
40 | 'test/js/promise/Promise.js',
41 | 'test/js/promise/Chain.js'
42 | ],
43 |
44 |
45 | // list of files to exclude
46 | exclude: [
47 | ],
48 |
49 | preprocessors: {
50 | 'build/deft-debug.js': ['coverage']
51 | },
52 |
53 | coverageReporter: {
54 | type: 'html',
55 | dir: 'test/coverage/touch/2.2.1'
56 | },
57 |
58 | // test results reporter to use
59 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
60 | reporters: ['dots'],
61 |
62 |
63 | // web server port
64 | port: 9876,
65 |
66 |
67 | // enable / disable colors in the output (reporters and logs)
68 | colors: true,
69 |
70 |
71 | // level of logging
72 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
73 | logLevel: config.LOG_INFO,
74 |
75 |
76 | // enable / disable watching file and executing tests whenever any file changes
77 | autoWatch: true,
78 |
79 |
80 | // Start these browsers, currently available:
81 | // - Chrome
82 | // - ChromeCanary
83 | // - Firefox
84 | // - Opera (has to be installed with `npm install karma-opera-launcher`)
85 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
86 | // - PhantomJS
87 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
88 | browsers: ['Chrome'],
89 |
90 |
91 | // If browser does not capture in given timeout [ms], kill it
92 | captureTimeout: 60000,
93 |
94 |
95 | // Continuous Integration mode
96 | // if true, it capture browsers, run tests and exit
97 | singleRun: false
98 | });
99 | };
100 |
--------------------------------------------------------------------------------
/packages/deft/test/lib/mocha-1.17.0/mocha.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 |
3 | body {
4 | margin:0;
5 | }
6 |
7 | #mocha {
8 | font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
9 | margin: 60px 50px;
10 | }
11 |
12 | #mocha ul,
13 | #mocha li {
14 | margin: 0;
15 | padding: 0;
16 | }
17 |
18 | #mocha ul {
19 | list-style: none;
20 | }
21 |
22 | #mocha h1,
23 | #mocha h2 {
24 | margin: 0;
25 | }
26 |
27 | #mocha h1 {
28 | margin-top: 15px;
29 | font-size: 1em;
30 | font-weight: 200;
31 | }
32 |
33 | #mocha h1 a {
34 | text-decoration: none;
35 | color: inherit;
36 | }
37 |
38 | #mocha h1 a:hover {
39 | text-decoration: underline;
40 | }
41 |
42 | #mocha .suite .suite h1 {
43 | margin-top: 0;
44 | font-size: .8em;
45 | }
46 |
47 | #mocha .hidden {
48 | display: none;
49 | }
50 |
51 | #mocha h2 {
52 | font-size: 12px;
53 | font-weight: normal;
54 | cursor: pointer;
55 | }
56 |
57 | #mocha .suite {
58 | margin-left: 15px;
59 | }
60 |
61 | #mocha .test {
62 | margin-left: 15px;
63 | overflow: hidden;
64 | }
65 |
66 | #mocha .test.pending:hover h2::after {
67 | content: '(pending)';
68 | font-family: arial, sans-serif;
69 | }
70 |
71 | #mocha .test.pass.medium .duration {
72 | background: #c09853;
73 | }
74 |
75 | #mocha .test.pass.slow .duration {
76 | background: #b94a48;
77 | }
78 |
79 | #mocha .test.pass::before {
80 | content: '✓';
81 | font-size: 12px;
82 | display: block;
83 | float: left;
84 | margin-right: 5px;
85 | color: #00d6b2;
86 | }
87 |
88 | #mocha .test.pass .duration {
89 | font-size: 9px;
90 | margin-left: 5px;
91 | padding: 2px 5px;
92 | color: #fff;
93 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
94 | -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
95 | box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
96 | -webkit-border-radius: 5px;
97 | -moz-border-radius: 5px;
98 | -ms-border-radius: 5px;
99 | -o-border-radius: 5px;
100 | border-radius: 5px;
101 | }
102 |
103 | #mocha .test.pass.fast .duration {
104 | display: none;
105 | }
106 |
107 | #mocha .test.pending {
108 | color: #0b97c4;
109 | }
110 |
111 | #mocha .test.pending::before {
112 | content: '◦';
113 | color: #0b97c4;
114 | }
115 |
116 | #mocha .test.fail {
117 | color: #c00;
118 | }
119 |
120 | #mocha .test.fail pre {
121 | color: black;
122 | }
123 |
124 | #mocha .test.fail::before {
125 | content: '✖';
126 | font-size: 12px;
127 | display: block;
128 | float: left;
129 | margin-right: 5px;
130 | color: #c00;
131 | }
132 |
133 | #mocha .test pre.error {
134 | color: #c00;
135 | max-height: 300px;
136 | overflow: auto;
137 | }
138 |
139 | /**
140 | * (1): approximate for browsers not supporting calc
141 | * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
142 | * ^^ seriously
143 | */
144 | #mocha .test pre {
145 | display: block;
146 | float: left;
147 | clear: left;
148 | font: 12px/1.5 monaco, monospace;
149 | margin: 5px;
150 | padding: 15px;
151 | border: 1px solid #eee;
152 | max-width: 85%; /*(1)*/
153 | max-width: calc(100% - 42px); /*(2)*/
154 | word-wrap: break-word;
155 | border-bottom-color: #ddd;
156 | -webkit-border-radius: 3px;
157 | -webkit-box-shadow: 0 1px 3px #eee;
158 | -moz-border-radius: 3px;
159 | -moz-box-shadow: 0 1px 3px #eee;
160 | border-radius: 3px;
161 | }
162 |
163 | #mocha .test h2 {
164 | position: relative;
165 | }
166 |
167 | #mocha .test a.replay {
168 | position: absolute;
169 | top: 3px;
170 | right: 0;
171 | text-decoration: none;
172 | vertical-align: middle;
173 | display: block;
174 | width: 15px;
175 | height: 15px;
176 | line-height: 15px;
177 | text-align: center;
178 | background: #eee;
179 | font-size: 15px;
180 | -moz-border-radius: 15px;
181 | border-radius: 15px;
182 | -webkit-transition: opacity 200ms;
183 | -moz-transition: opacity 200ms;
184 | transition: opacity 200ms;
185 | opacity: 0.3;
186 | color: #888;
187 | }
188 |
189 | #mocha .test:hover a.replay {
190 | opacity: 1;
191 | }
192 |
193 | #mocha-report.pass .test.fail {
194 | display: none;
195 | }
196 |
197 | #mocha-report.fail .test.pass {
198 | display: none;
199 | }
200 |
201 | #mocha-report.pending .test.pass,
202 | #mocha-report.pending .test.fail {
203 | display: none;
204 | }
205 | #mocha-report.pending .test.pass.pending {
206 | display: block;
207 | }
208 |
209 | #mocha-error {
210 | color: #c00;
211 | font-size: 1.5em;
212 | font-weight: 100;
213 | letter-spacing: 1px;
214 | }
215 |
216 | #mocha-stats {
217 | position: fixed;
218 | top: 15px;
219 | right: 10px;
220 | font-size: 12px;
221 | margin: 0;
222 | color: #888;
223 | z-index: 1;
224 | }
225 |
226 | #mocha-stats .progress {
227 | float: right;
228 | padding-top: 0;
229 | }
230 |
231 | #mocha-stats em {
232 | color: black;
233 | }
234 |
235 | #mocha-stats a {
236 | text-decoration: none;
237 | color: inherit;
238 | }
239 |
240 | #mocha-stats a:hover {
241 | border-bottom: 1px solid #eee;
242 | }
243 |
244 | #mocha-stats li {
245 | display: inline-block;
246 | margin: 0 5px;
247 | list-style: none;
248 | padding-top: 11px;
249 | }
250 |
251 | #mocha-stats canvas {
252 | width: 40px;
253 | height: 40px;
254 | }
255 |
256 | #mocha code .comment { color: #ddd; }
257 | #mocha code .init { color: #2f6fad; }
258 | #mocha code .string { color: #5890ad; }
259 | #mocha code .keyword { color: #8a6343; }
260 | #mocha code .number { color: #2f6fad; }
261 |
262 | @media screen and (max-device-width: 480px) {
263 | #mocha {
264 | margin: 60px 0px;
265 | }
266 |
267 | #mocha #stats {
268 | position: absolute;
269 | }
270 | }
271 |
--------------------------------------------------------------------------------
/packages/deft/test/lib/mocha-as-promised-2.0.0/mocha-as-promised.js:
--------------------------------------------------------------------------------
1 | (function (mochaAsPromised) {
2 | "use strict";
3 |
4 | function findNodeJSMocha(moduleToTest, suffix, accumulator) {
5 | if (accumulator === undefined) {
6 | accumulator = [];
7 | }
8 |
9 | if (moduleToTest.id.indexOf(suffix, moduleToTest.id.length - suffix.length) !== -1 && moduleToTest.exports) {
10 | accumulator.push(moduleToTest.exports);
11 | }
12 |
13 | moduleToTest.children.forEach(function (child) {
14 | findNodeJSMocha(child, suffix, accumulator);
15 | });
16 |
17 | return accumulator;
18 | }
19 |
20 | // Module systems magic dance.
21 |
22 | if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
23 | // Node.js: plug in automatically, if no argument is provided. This is a good idea since one can run Mocha tests
24 | // using the Mocha test runner from either a locally-installed package, or from a globally-installed one.
25 | // In the latter case, naively plugging in `require("mocha")` would end up duck-punching the wrong instance,
26 | // so we provide this shortcut to auto-detect which Mocha package needs to be duck-punched.
27 | module.exports = function (mochaModules) {
28 | if (mochaModules === undefined) {
29 | if (typeof process === "object" && Object.prototype.toString.call(process) === "[object process]") {
30 | // We're in *real* Node.js, not in a browserify-like environment. Do automatic detection logic.
31 |
32 | // Funky syntax prevents Browserify from detecting the require, since it's needed for Node.js-only
33 | // stuff.
34 | var path = (require)("path");
35 | var suffix = path.join("mocha", "lib", "mocha.js");
36 | mochaModules = findNodeJSMocha(require.main, suffix);
37 |
38 | if (mochaModules === undefined) {
39 | throw new Error("Attempted to automatically plug in to Mocha, but could not detect a " +
40 | "running Mocha module.");
41 | }
42 |
43 | } else if (typeof Mocha !== "undefined") {
44 | // We're in a browserify-like emulation environment. Try the `Mocha` global.
45 | mochaModules = [Mocha];
46 | } else {
47 | throw new Error("Attempted to automatically plug in to Mocha, but could not detect the " +
48 | "environment. Plug in manually by passing the running Mocha module.");
49 | }
50 | }
51 |
52 | mochaModules.forEach(mochaAsPromised);
53 | };
54 | } else if (typeof define === "function" && define.amd) {
55 | // AMD
56 | define(function () {
57 | return mochaAsPromised;
58 | });
59 | } else {
60 | // Other environment (usually