mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-24 03:35:59 +08:00
rpvhost plugin
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
process.env.NODE_ENV = 'test'
|
||||
|
||||
if process.env.COV_TEST == 'true'
|
||||
require('coffee-coverage').register
|
||||
path: 'relative'
|
||||
basePath: "#{__dirname}/../.."
|
||||
exclude: ['test', 'node_modules', '.git', 'sample', 'core/static', 'migration/database']
|
||||
config = require '../config'
|
||||
|
||||
global._ = require 'underscore'
|
||||
global.fs = require 'fs'
|
||||
@@ -14,6 +10,18 @@ global.chai = require 'chai'
|
||||
global.supertest = require 'supertest'
|
||||
global.ObjectId = (require 'mongoose').Types.ObjectId
|
||||
|
||||
if process.env.COV_TEST == 'true'
|
||||
require('coffee-coverage').register
|
||||
path: 'relative'
|
||||
basePath: "#{__dirname}/../.."
|
||||
exclude: do ->
|
||||
result = ['test', 'node_modules', '.git', 'sample', 'core/static', 'migration/database']
|
||||
|
||||
for plugin_name in _.union config.plugin.available_extensions, config.plugin.available_services
|
||||
result.push "plugin/#{plugin_name}/test"
|
||||
|
||||
return result
|
||||
|
||||
global.expect = chai.expect
|
||||
|
||||
global.created_objects =
|
||||
@@ -26,7 +34,6 @@ global.namespace = {}
|
||||
chai.should()
|
||||
chai.config.includeStack = true
|
||||
|
||||
config = require '../config'
|
||||
config.web.listen = 12558
|
||||
|
||||
if process.env.TRAVIS == 'true'
|
||||
|
||||
Reference in New Issue
Block a user