Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer Controller TypeScript #2073

Merged
merged 1 commit into from Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
129 changes: 69 additions & 60 deletions karma.conf.js
Expand Up @@ -6,56 +6,65 @@ const webpack = require('webpack');
const path = require('path');

module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
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', 'sinon', 'should'],
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'sinon', 'should'],

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

// list of files to exclude
exclude: [],
// 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: {
'**/*.js': ['webpack', 'sourcemap']
tjenkinson marked this conversation as resolved.
Show resolved Hide resolved
},
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'tests/**/*.js': ['webpack', 'sourcemap']
},

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

coverageIstanbulReporter: {
reports: ['lcov', 'text-summary'],
fixWebpackSourcePaths: true
},
coverageIstanbulReporter: {
reports: ['lcov', 'text-summary'],
fixWebpackSourcePaths: true
},

webpack: {
webpack: {
mode: 'development',
devtool: 'inline-source-map',
module: {
rules: [
// instrument only testing sources with Istanbul
{
test: /\.js$/,
include: path.resolve('src/'),
exclude: path.resolve(__dirname, 'node_modules'),
use: [
{
loader: 'istanbul-instrumenter-loader',
options: { esModules: true }
}
]
}
]
devtool: 'inline-source-map',
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.(ts|js)$/,
include: path.resolve(__dirname, 'src'),
exclude: path.resolve(__dirname, 'node_modules'),
loader: 'ts-loader'
},
// instrument only testing sources with Istanbul
{
test: /\.(ts|js)$/,
exclude: path.resolve(__dirname, 'node_modules'),
enforce: 'post',
use: [
{
loader: 'istanbul-instrumenter-loader',
options: { esModules: true }
}
]
}
]
},
plugins: [
new webpack.DefinePlugin({
Expand All @@ -65,31 +74,31 @@ module.exports = function(config) {
__USE_EME_DRM__: JSON.stringify(true)
})
]
},
},

// web server port
port: 9876,
// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors: true,
// 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,
// 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: false,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,

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

// 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,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
});
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
});
};
29 changes: 26 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -81,7 +81,7 @@
"ts-loader": "^4.4.2",
"ts-node": "^6.1.0",
"typescript": "^2.9.1",
"typescript-eslint-parser": "^16.0.0",
"typescript-eslint-parser": "^21.0.2",
"webpack": "^4.11.1",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-cli": "^3.0.2",
Expand Down