mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 09:41:57 +00:00
remove old karma test config, make webpackdevserver optional
`npm install` continues to install everything, but `npm install --no-optional` wont install the dev server.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
FROM node:0.10
|
||||
WORKDIR /home/weave
|
||||
COPY package.json /home/weave/
|
||||
RUN npm install
|
||||
# Dont install optional developer tools
|
||||
RUN npm install --no-optional
|
||||
COPY webpack.local.config.js webpack.production.config.js server.js .eslintrc /home/weave/
|
||||
|
||||
@@ -36,20 +36,22 @@
|
||||
"eslint-loader": "^0.11.2",
|
||||
"eslint-plugin-jasmine": "^1.0.0",
|
||||
"eslint-plugin-react": "^2.3.0",
|
||||
"express": "^4.13.3",
|
||||
"express-http-proxy": "^0.6.0",
|
||||
"file-loader": "^0.8.4",
|
||||
"jest-cli": "0.4.19",
|
||||
"json-loader": "^0.5.2",
|
||||
"less": "^2.5.1",
|
||||
"less-loader": "^2.2.0",
|
||||
"postcss-loader": "^0.4.3",
|
||||
"proxy-middleware": "^0.13.1",
|
||||
"react-hot-loader": "^1.2.8",
|
||||
"style-loader": "^0.12.3",
|
||||
"url": "^0.10.3",
|
||||
"url-loader": "^0.5.6",
|
||||
"webpack": "^1.9.10",
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"express": "^4.13.3",
|
||||
"express-http-proxy": "^0.6.0",
|
||||
"proxy-middleware": "^0.13.1",
|
||||
"react-hot-loader": "^1.2.8",
|
||||
"webpack-dev-server": "^1.10.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Testing
|
||||
|
||||
Scope unit testing is done unsing Karma/Jasmine. (Jest was too big and slow.)
|
||||
|
||||
To run tests, do `npm test` in the toplevel directory.
|
||||
|
||||
The tests are placed in `__tests__` directories, relative to what they are testing.
|
||||
|
||||
For more info see [Testing Flux Apps with Karma](http://kentor.me/posts/testing-react-and-flux-applications-with-karma-and-webpack/)
|
||||
@@ -1,49 +0,0 @@
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
browsers: [
|
||||
'PhantomJS'
|
||||
],
|
||||
files: [
|
||||
'./polyfill.js',
|
||||
{
|
||||
pattern: 'tests.webpack.js',
|
||||
watched: false
|
||||
}
|
||||
],
|
||||
frameworks: [
|
||||
'jasmine'
|
||||
],
|
||||
preprocessors: {
|
||||
'tests.webpack.js': ['webpack']
|
||||
},
|
||||
reporters: [
|
||||
'dots',
|
||||
'coverage'
|
||||
],
|
||||
coverageReporter: {
|
||||
type: 'text-summary'
|
||||
},
|
||||
webpack: {
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js?$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
],
|
||||
postLoaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(test|node_modules|bower_components)\//,
|
||||
loader: 'istanbul-instrumenter'
|
||||
}
|
||||
]
|
||||
},
|
||||
watch: true
|
||||
},
|
||||
webpackServer: {
|
||||
noInfo: true
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* Function.prototype.bind polyfill used by PhantomJS
|
||||
*/
|
||||
if (typeof Function.prototype.bind != 'function') {
|
||||
Function.prototype.bind = function bind(obj) {
|
||||
var args = Array.prototype.slice.call(arguments, 1),
|
||||
self = this,
|
||||
nop = function() {
|
||||
},
|
||||
bound = function() {
|
||||
return self.apply(
|
||||
this instanceof nop ? this : (obj || {}), args.concat(
|
||||
Array.prototype.slice.call(arguments)
|
||||
)
|
||||
);
|
||||
};
|
||||
nop.prototype = this.prototype || {};
|
||||
bound.prototype = new nop();
|
||||
return bound;
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
var ReactTools = require('react-tools');
|
||||
|
||||
module.exports = {
|
||||
process: function(src) {
|
||||
return ReactTools.transform(src);
|
||||
}
|
||||
};
|
||||
@@ -1,2 +0,0 @@
|
||||
var context = require.context('../app/scripts', true, /-test\.js$/);
|
||||
context.keys().forEach(context);
|
||||
Reference in New Issue
Block a user