Skip to content

Commit

Permalink
Universal unit testing (#125)
Browse files Browse the repository at this point in the history
* Separate window by environment
* Install Karma
* Rename Web Components build rules
* Separate test files by environment
* Add override modifier
* Gather risky functions that interact with HTML elements in one place
  • Loading branch information
tushuhei authored Mar 16, 2023
1 parent 2e36bc7 commit 42ec92c
Show file tree
Hide file tree
Showing 13 changed files with 1,330 additions and 2,691 deletions.
31 changes: 31 additions & 0 deletions javascript/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* @license
* Copyright 2023 Google LLC
* 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.
*/

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: ['bundle/tests/*.js'],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['ChromeHeadless'],
singleRun: true,
concurrency: Infinity,
});
};
Loading

0 comments on commit 42ec92c

Please sign in to comment.