before(function(callback) { this.slow(100); const We = require('we-core'); we = new We(); testTools.init({}, we); we.bootstrap({ port: 9800, hostname: 'http://localhost:9800', appName: 'We test', session: getSessionConfigs(), database: { test: { dialect: 'sqlite', storage: path.join(projectPath, 'database.sqlite') } }, i18n: { directory: path.join(__dirname, 'locales'), updateFiles: true } } , callback); });
path.resolve(process.cwd(), 'node_modules/we-plugin-post'), function (err) { if (err) { return console.error(err); } we = new We({ bootstrapMode: 'test' }); testTools.init({}, we); we.bootstrap({ // disable access log enableRequestLog: false, i18n: { directory: path.resolve(__dirname, '..', 'config/locales'), updateFiles: true, locales: ['en-us'] }, themes: {} }, function (err, we) { if (err) return console.error(err); we.startServer(function (err) { if (err) return console.error(err); callback(); }); }); });
testTools.copyLocalConfigIfNotExitst(projectPath, function() { we = new We(); testTools.init({}, we); we.bootstrap({ // disable access log enableRequestLog: false, i18n: { directory: path.resolve(__dirname, '..', 'config/locales'), updateFiles: true, locales: ['en-us'] }, themes: {}, hostname: null, oauth2: { redirectToLoginUrl: '/login' }, session: { cookie: { domain: null } } }, function (err, we) { if (err) return console.error(err); we.startServer(function (err) { if (err) return console.error(err); callback(); }); }); });
before(function(callback) { this.slow(100); const We = require('we-core'); we = new We(); testTools.init({}, we); we.bootstrap({ i18n: { directory: path.join(__dirname, 'locales'), updateFiles: true } } , callback); });
before(function(callback) { this.slow(100); if ( !process.env.FB_CLIENT_ID || !process.env.FB_CLIENT_SECRET ) { console.error('env.FB_APP_ID and env.FB_APP_SECRET is required'); process.exit(1); } const We = require('we-core'); we = new We(); testTools.init({}, we); we.bootstrap({ port: 9800, hostname: 'http://localhost:9800', appName: 'We test', passport: { accessTokenTime: 300000000, cookieDomain: null, cookieName: 'weoauth', cookieSecure: false, strategies: { facebook: { clientID: process.env.FB_CLIENT_ID, clientSecret: process.env.FB_CLIENT_SECRET } } }, session: getSessionConfigs(), database: { test: { dialect: 'sqlite', storage: path.join(projectPath, 'database.sqlite') } }, i18n: { directory: path.join(__dirname, 'locales'), updateFiles: true } } , callback); });
testTools.copyLocalConfigIfNotExitst(projectPath, function() { we = new We(); testTools.init({}, we); we.bootstrap({ // disable access log enableRequestLog: false, i18n: { directory: path.resolve(__dirname, '..', 'config/locales'), updateFiles: true, locales: ['en-us'] }, themes: {} }, (err)=>{ if (err) return console.error(err); callback(err); }); });
testTools.copyLocalConfigIfNotExitst(projectPath, function() { const We = require('we-core'); we = new We(); testTools.init({}, we); we.bootstrap({ i18n: { directory: path.join(__dirname, 'locales'), updateFiles: true } } , function (err, we) { if (err) throw err; we.startServer(function(err) { if (err) throw err; callback(); }); }); });
testTools.copyLocalConfigIfNotExitst(projectPath, function() { const We = require('we-core'); we = new We(); testTools.init({}, we); we.bootstrap({ i18n: { directory: path.join(__dirname, 'locales'), updateFiles: true }, themes: { enabled: ['we-theme-site-wejs'], app: 'we-theme-site-wejs' } }, function(err, we) { if (err) throw err; we.plugins['we-plugin-widget'] = we.plugins.project; callback(); }); });
before(function(callback) { this.slow(100); this.timeout(30000); const We = require('we-core'); we = new We(); testTools.init({}, we); we.bootstrap({ port: 9800, i18n: { directory: path.resolve(__dirname, '../config', 'locales'), updateFiles: true }, event: { themes: ['we-theme-event'], defaultTheme: 'we-theme-event' }, themes: { enabled: [ 'we-theme-event', 'we-theme-pratt', 'we-theme-admin-default', ], app: 'we-theme-pratt', admin: 'we-theme-admin-default' } } , function(err, we) { if (err) throw err; we.startServer(function(err) { if (err) throw err; callback(); }) }); });
testTools.copyLocalConfigIfNotExitst(projectPath, function() { we = require('we-core'); testTools.init({}, we); we.bootstrap({ i18n: { directory: path.join(__dirname, 'locales'), updateFiles: true }, doc: { projects: [{ name: 'we', gitRemote: 'https://github.com/wejs/we.git' }] } } , function(err, we) { if (err) throw err; we.startServer(function(err) { if (err) throw err; callback(); }); }); });