karma.base.config.js 758 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. var alias = require('./alias')
  2. var webpack = require('webpack')
  3. var webpackConfig = {
  4. resolve: {
  5. alias: Object.assign({}, alias, {
  6. entities: './entity-decoder'
  7. })
  8. },
  9. module: {
  10. loaders: [
  11. {
  12. test: /\.js$/,
  13. loader: 'babel!eslint',
  14. exclude: /node_modules/
  15. }
  16. ]
  17. },
  18. plugins: [
  19. new webpack.DefinePlugin({
  20. 'process.env': {
  21. NODE_ENV: '"development"'
  22. }
  23. })
  24. ],
  25. devtool: '#inline-source-map'
  26. }
  27. // shared config for all unit tests
  28. module.exports = {
  29. frameworks: ['jasmine'],
  30. files: [
  31. '../test/unit/index.js'
  32. ],
  33. preprocessors: {
  34. '../test/unit/index.js': ['webpack', 'sourcemap']
  35. },
  36. webpack: webpackConfig,
  37. webpackMiddleware: {
  38. noInfo: true
  39. }
  40. }