Skip to content

Commit

Permalink
getting browser tests to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kuba committed Aug 3, 2022
1 parent dd25831 commit 586778f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
24 changes: 24 additions & 0 deletions experimental/packages/opentelemetry-api-logs/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*!
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const karmaWebpackConfig = require('../../../karma.webpack');
const karmaBaseConfig = require('../../../karma.base');

module.exports = (config) => {
config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig
}))
};
17 changes: 15 additions & 2 deletions experimental/packages/opentelemetry-api-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,21 @@
"@opentelemetry/api": "^1.1.0"
},
"devDependencies": {
"nyc": "^15.1.0",
"ts-mocha": "^10.0.0",
"@types/mocha": "8.2.3",
"@types/node": "14.17.33",
"@types/webpack-env": "1.16.3",
"codecov": "3.8.3",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"mocha": "7.2.0",
"nyc": "15.1.0",
"ts-loader": "8.3.0",
"ts-mocha": "9.0.2",
"typescript": "4.4.4",
"webpack": "4.46.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

export * from './browser';
export * from './node';
20 changes: 20 additions & 0 deletions experimental/packages/opentelemetry-api-logs/test/index-webpack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const testsContext = require.context('.', true, /test$/);
testsContext.keys().forEach(testsContext);

const srcContext = require.context('.', true, /src$/);
srcContext.keys().forEach(srcContext);

0 comments on commit 586778f

Please sign in to comment.