Skip to content

Commit

Permalink
Merge 4bea180 into 943b558
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Jul 11, 2018
2 parents 943b558 + 4bea180 commit d381e48
Show file tree
Hide file tree
Showing 48 changed files with 6,394 additions and 5,639 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
@@ -1 +1,8 @@
*.md
**/*{.,-}min.js
test/integration/utils/kjur.js
docs
node_modules
dist
bin
.git
1 change: 1 addition & 0 deletions .eslintrc.json
Expand Up @@ -28,6 +28,7 @@
"process": true
},
"parserOptions": {
"ecmaVersion": 2015,
"ecmaFeatures" : {
"modules": true
}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -25,3 +25,5 @@ build/Release
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
bower_components

.tern-port
7 changes: 7 additions & 0 deletions .prettierignore
@@ -0,0 +1,7 @@
**/*{.,-}min.js
test/integration/utils/kjur.js
dist
bin
.git
docs
**/*.sh
14 changes: 14 additions & 0 deletions .prettierrc
@@ -0,0 +1,14 @@
{
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"tabWidth": 2,
"overrides": [
{
"files": "*.ts",
"options": {
"trailingComma": "all"
}
}
]
}
2 changes: 1 addition & 1 deletion bin/travis.sh
Expand Up @@ -4,7 +4,7 @@ set -e
npm test
./bin/coveralls.sh
if [ ${RUN_LINTERS:="no"} == "yes" ]; then
./node_modules/.bin/eslint src/**/*.js;
npm run lint
# ./node_modules/.bin/dtslint types/getstream
fi
npm install -g bower
Expand Down
135 changes: 67 additions & 68 deletions karma.ci.config.js
@@ -1,79 +1,78 @@
var baseConfig = require('./karma.config.js');

module.exports = function(config) {
baseConfig(config);

baseConfig(config);
var customLaunchers = {
SL_Chrome: {
base: 'SauceLabs',
browserName: 'chrome',
},
SL_FireFox: {
base: 'SauceLabs',
browserName: 'firefox',
},
SL_Safari: {
base: 'SauceLabs',
browserName: 'safari',
},
SL_IE_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10',
},
SL_IE_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11',
},
// 'SL_IE_13': {
// base: 'SauceLabs',
// browserName: 'microsoftedge',
// version: '13',
// platform: 'Windows 10',
// },
SL_IE_14: {
base: 'SauceLabs',
browserName: 'microsoftedge',
version: '14',
platform: 'Windows 10',
},
};

var customLaunchers = {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
},
'SL_FireFox': {
base: 'SauceLabs',
browserName: 'firefox',
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
},
'SL_IE_10': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10',
},
'SL_IE_11': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11',
},
// 'SL_IE_13': {
// base: 'SauceLabs',
// browserName: 'microsoftedge',
// version: '13',
// platform: 'Windows 10',
// },
'SL_IE_14': {
base: 'SauceLabs',
browserName: 'microsoftedge',
version: '14',
platform: 'Windows 10',
},
};
config.set({
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
sauceLabs: {
testName: 'Stream-JS Browser Tests',
public: 'public',
connectOptions: {
// verbose: true,
// verboseDebugging: true,
},
},
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),

config.set({
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
sauceLabs: {
testName: 'Stream-JS Browser Tests',
public: "public",
connectOptions: {
// verbose: true,
// verboseDebugging: true,
}
},
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
reporters: ['dots', 'saucelabs'],

reporters: ['dots', 'saucelabs'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
captureTimeout: 60000,
// Somehow karma doesn't capture intermediate behavior and only
// captures once an entire suite is complete. This timeout will
// guarantee that the browser will have enough time to do this:

captureTimeout: 60000,
// Somehow karma doesn't capture intermediate behavior and only
// captures once an entire suite is complete. This timeout will
// guarantee that the browser will have enough time to do this:
// Integration tests can take very long we will give the browser
// 300 seconds to complete these.
browserNoActivityTimeout: 300 * 1000,

// Integration tests can take very long we will give the browser
// 300 seconds to complete these.
browserNoActivityTimeout: 300 * 1000,

// Concurrency level
// how many browser should be started simultaneous
concurrency: 3
});
// Concurrency level
// how many browser should be started simultaneous
concurrency: 3,
});
};
141 changes: 69 additions & 72 deletions karma.config.js
@@ -1,4 +1,3 @@
var path = require('path');
var webpack = require('webpack');
var webpackConfig = require('./webpack.config.js')();

Expand All @@ -7,80 +6,78 @@ delete webpackConfig['entry'];
delete webpackConfig['output'];
webpackConfig['devtool'] = 'inline-source-map';
webpackConfig['plugins'] = [
new webpack.EnvironmentPlugin([
'STREAM_API_KEY',
'STREAM_API_SECRET',
'STREAM_APP_ID',
])
new webpack.EnvironmentPlugin([
'STREAM_API_KEY',
'STREAM_API_SECRET',
'STREAM_APP_ID',
]),
];
webpackConfig['node']['Buffer'] = true;
webpackConfig['module']['rules'].push({ test: /\.json$/, exclude:/node_modules/, loader: 'json-loader' });
webpackConfig['module']['rules'].push({
test: /\.json$/,
exclude: /node_modules/,
loader: 'json-loader',
});

// Karma config
module.exports = function(config) {

config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha'],

// list of files / patterns to load in the browser
files: [
'test/unit/common/**/*_test.js',
'test/unit/browser/**/*_test.js',
],

// list of files to exclude
exclude: [
],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/unit/common/**/*_test.js': [ 'webpack', 'sourcemap' ],
'test/unit/browser/**/*_test.js': [ 'webpack', 'sourcemap' ],
},

// Webpack configuration for webpack preprocessor
webpack: webpackConfig,
webpackMiddleware: {
// webpack-dev-middleware configuration
// i. e.
stats: 'errors-only'
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha'],

// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,

});
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha'],

// list of files / patterns to load in the browser
files: ['test/unit/common/**/*_test.js', 'test/unit/browser/**/*_test.js'],

// list of files to exclude
exclude: [],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/unit/common/**/*_test.js': ['webpack', 'sourcemap'],
'test/unit/browser/**/*_test.js': ['webpack', 'sourcemap'],
},

// Webpack configuration for webpack preprocessor
webpack: webpackConfig,
webpackMiddleware: {
// webpack-dev-middleware configuration
// i. e.
stats: 'errors-only',
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha'],

// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,
});
};

0 comments on commit d381e48

Please sign in to comment.