-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
38 lines (33 loc) · 850 Bytes
/
index.js
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
/**
* @license Copyright (c) 2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
'use strict';
const path = require( 'path' );
/**
* Adds `src/asserts.js` and `chai.js` file paths to files array which results
* in Karma including them in the test context.
*
* @param {Array} files Array of files loaded by Karma.
* @returns {undefined} undefined
*/
function loadAsserts( files ) {
files.unshift( {
pattern: path.join( __dirname, 'src/asserts.js' ),
included: true,
served: true,
watched: false,
nocache: false
} );
files.unshift( {
pattern: require.resolve( 'chai/chai.js' ),
included: true,
served: true,
watched: false,
nocache: false
} );
}
loadAsserts.$inject = [ 'config.files' ];
module.exports = {
'framework:ckeditor4-yui-to-chai': [ 'factory', loadAsserts ]
};