Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Feb 20, 2023
2 parents 4e8de8e + 40776e7 commit 60bdc76
Show file tree
Hide file tree
Showing 64 changed files with 35,014 additions and 18,663 deletions.
17 changes: 6 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: 2.1
orbs:
browser-tools: circleci/[email protected]

executors:
dashjs-executor:
working_directory: ~/repo
docker:
- image: cimg/node:10.20.1
- image: cimg/node:16.18.1

commands:
dependencies_setup:
Expand Down Expand Up @@ -47,6 +49,7 @@ commands:

build_unit_test_steps:
steps:
- browser-tools/install-browser-tools
- run:
name: Build and run unit tests
command: |
Expand Down Expand Up @@ -84,14 +87,6 @@ jobs:
- checkout
- dependencies_setup
- build_unit_test_steps
- deploy:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" = "development" ] && [ -n "$DEPLOY_HOST" ] && [ -n "$DEPLOY_USER" ] && [ -n "$DEPLOY_PASSWORD" ]; then
node deploy.js --host=$DEPLOY_HOST --user=$DEPLOY_USER --password=$DEPLOY_PASSWORD
else
echo "Not on development branch or deploy not configured. Dry run only, nothing will be deployed."
fi

merge-build-and-unit-test:
executor: dashjs-executor
Expand Down Expand Up @@ -129,11 +124,11 @@ jobs:
- run:
name: Run functional tests for one vector (chrome / https)
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/singleVector.json
node test/functional/runTests.js --selenium=remote --reporters=junit --debug=true --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/singleVector.json
- run:
name: Run functional tests for smoke vectors (chrome / https)
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/smokeVectors.json
node test/functional/runTests.js --selenium=remote --reporters=junit --debug=true --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/smokeVectors.json
- store_test_results:
path: test/functional/reports

Expand Down
8 changes: 7 additions & 1 deletion build/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ const config = {
]
}
]
}
},
//Webpack 5 no longer polyfills Node.js core modules automatically
resolve: {
fallback: {
stream: require.resolve('stream-browserify'),
},
},
}

module.exports = {config};
19 changes: 6 additions & 13 deletions build/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { merge } = require('webpack-merge');
const common = require('./webpack.base.js').config;
const webpack = require("webpack");
const path = require('path');

const config = merge(common, {
Expand All @@ -14,20 +13,14 @@ const config = merge(common, {
filename: '[name].debug.js',
},
devServer: {
contentBase: path.join(__dirname, '../'),
open: true,
openPage: 'samples/index.html',
static: {
directory: path.join(__dirname, '../'),
},
open: ['samples/index.html'],
hot: true,
compress: true,
port: 3000,
watchOptions: {
aggregateTimeout: 300,
poll: 1000
}
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
]
port: 3000
}
});

module.exports = config;
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ declare namespace dashjs {
cacheInitSegments?: boolean,
eventControllerRefreshDelay?: number,
enableManifestDurationMismatchFix?: boolean,
enableManifestTimescaleMismatchFix?: boolean,
capabilities?: {
filterUnsupportedEssentialProperties?: boolean,
useMediaCapabilitiesApi?: boolean
Expand Down Expand Up @@ -227,6 +228,7 @@ declare namespace dashjs {
},
text?: {
defaultEnabled?: boolean,
extendSegmentedCues?: boolean,
webvtt?: {
customRenderingEnabled?: number
}
Expand Down Expand Up @@ -332,6 +334,13 @@ declare namespace dashjs {
rtpSafetyFactor?: number,
mode?: 'query' | 'header',
enabledKeys?: Array<string>
},
cmsd?: {
enabled?: boolean,
abr?: {
applyMb: boolean,
etpWeightRatio?: number
}
}
};
errors?: {
Expand Down
102 changes: 102 additions & 0 deletions karma.unit.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
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', 'chai', 'webpack'],

plugins: [
'karma-webpack',
'karma-mocha',
'karma-chai',
'karma-coverage',
'karma-mocha-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
],

middleware: [],

// list of files / patterns to load in the browser
// https://github.com/webpack-contrib/karma-webpack#alternative-usage
files: [
{pattern: 'test/unit/*.js', watched: false},
{pattern: 'src/**/*.js', watched: false, included: false, nocache: true},
{pattern: 'test/unit/data/**/*', watched: false, included: false, served: true}
],

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

client: {
useIframe: false,
mocha: {
timeout: 90000
}
},


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


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

// optionally, configure the reporter
coverageReporter: {
type: 'html',
dir: 'test/coverage/'
},


webpack: {
cache: false,
resolve: {
fallback: {
stream: require.resolve('stream-browserify'),
},
},
},

// web server port
port: 9999,


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


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

// 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: 1
})
}
3 changes: 0 additions & 3 deletions mochahook.js

This file was deleted.

Loading

0 comments on commit 60bdc76

Please sign in to comment.