forked from huridocs/uwazi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_test.js
46 lines (39 loc) · 1.17 KB
/
api_test.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
39
40
41
42
43
44
45
46
require('babel-core/register')({
"retainLines": "true",
"presets": ["es2015", "react"],
"plugins": [
["babel-plugin-module-alias", [
{ "src": "./app/react", "expose": "app" },
{ "src": "./app/shared", "expose": "shared" },
{ "src": "./app/api", "expose": "api" }
]],
"transform-class-properties",
"add-module-exports"
]
}); //babel polyfill ES6
var Jasmine = require('jasmine');
var jasmine = new Jasmine();
var SpecReporter = require('jasmine-spec-reporter');
//var customMatchers = require('./app/api/utils/jasmineMatchers.js');
//jasmine.getEnv().addMatchers(customMatchers);
var db_config = require('./app/api/config/database.js');
db_config.db_url = db_config.testing;
var elasticConfig = require('./app/api/config/elasticIndexes.js');
elasticConfig.index = elasticConfig.production;
jasmine.loadConfig({
spec_dir: 'app/',
spec_files: [
'api/**/*[sS]pec.js',
'shared/**/*[sS]pec.js'
],
helpers: [
'/api/utils/jasmineHelpers.js'
]
});
jasmine.addReporter(new SpecReporter({
displayStacktrace: 'summary',
displaySuccessfulSpec: false,
displayFailedSpec: false,
displaySpecDuration: true
}));
jasmine.execute();