我正在尝试使用最新的angular-cli(angular-cli@webpack-beta.11)为我的项目配置wallabyjs。我跟着“官方”angular2-webpack-wallaby config,但不幸的是我有错误
wallaby.js
这是我的var wallabyWebpack = require('wallaby-webpack');
var webpackPostprocessor = wallabyWebpack({
entryPatterns: [
'config/spec-bundle.js',
'src/**/*spec.js'
],
module: {
loaders: [
{test: /\.css$/, loader: 'raw-loader'},
{test: /\.html$/, loader: 'raw-loader'},
{test: /karma-require/, loader: 'null'}
]
}
});
module.exports = function () {
return {
files: [
{pattern: 'config/spec-bundle.js', load: false},
{pattern: 'config/karma-require.js', load: false},
{pattern: 'src/**/*.ts', load: false},
{pattern: 'src/**/*.css', load: false},
{pattern: 'src/**/*.html', load: false},
{pattern: 'src/**/*spec.ts', ignore: true}
],
tests: [
{pattern: 'src/**/*spec.ts', load: false}
],
testFramework: 'jasmine',
env: {
runner: require('phantomjs-prebuilt').path,
params: { runner: '--web-security=false' }
},
postprocessor: webpackPostprocessor,
setup: function () {
window.__moduleBundler.loadTests();
}
};
};
spec-bundle.js
我的Error.stackTraceLimit = Infinity;
require('core-js');
// Typescript emit helpers polyfill
require('ts-helpers');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/jasmine-patch');
require('zone.js/dist/async-test');
// RxJS
require('rxjs/Rx');
var testing = require('@angular/core/testing');
var browser = require('@angular/platform-browser-dynamic/testing');
testing.setBaseTestProviders(
browser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
browser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
);
Object.assign(global, testing);
window.__karma__;
var testContext = require.context('../src', true, /\.spec\.ts/);
function requireAll(requireContext) {
return requireContext.keys().map(requireContext);
}
// requires and returns all modules that match
var modules = requireAll(testContext);
DECLARE @text NVARCHAR(20) = 'test;parameter;here'
SELECT Col INTO #text FROM dbo.GetTableFromDelimitedString(@text, ';')
SELECT * FROM table WHERE col IN (SELECT Col FROM #text)
有人可以帮我这个吗?