This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
MVP/pre-release #1
Open
usergenic
wants to merge
21
commits into
master
Choose a base branch
from
third-rewrites-a-charm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
5e76746
WIP commit.
usergenic d40cc25
WIP commit.
usergenic 6207792
WIP commit.
usergenic 944ccec
WIP commit
usergenic 149f747
WIP commit.
usergenic 6d84f9f
Make the code more friendly to older browsers by not using maps etc.
usergenic 77993ba
Added test output verification to tests.
usergenic 4f77417
Removed the special log method on controller.
usergenic f8d806f
WIP commit verify test results behavior.
usergenic d35175f
Minor test fix
usergenic 2b85220
Remove commented-out imports.
usergenic 493040c
Fixed tab in readme.
usergenic 148e301
removed of mine from readme.
usergenic 7773a6e
README
usergenic cbd9493
Change the style of container.
usergenic 6d75ced
Don't use Object.values() if you're compiling for IE11 which doesn't …
usergenic 9a87cd2
Ditch MochaRunnerEvents in favor of mocha.Runner.constants directly.
usergenic 1f3f3ba
Removed stats-collector in favor of built-in stats and accumulator ev…
usergenic 3d91f6c
Remove unused runner proxy method initResults
usergenic 61c2c38
Add travis.yml
usergenic 6e76458
Let verify-test-results pipe chunks to stdout. Also, discovered weird…
usergenic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BasedOnStyle: Google | ||
AlignAfterOpenBracket: AlwaysBreak | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
BinPackArguments: false | ||
# This breaks async functions sometimes, see | ||
# https://github.com/Polymer/polymer-analyzer/pull/393 | ||
# BinPackParameters: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.vscode/ | ||
/node_modules/ | ||
/lib/ | ||
/mocha-suite-child.js | ||
/mocha-suite-child.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mocha-suite-child.js | ||
rollup.config.js | ||
tsconfig.json | ||
tslint.json | ||
test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
language: node_js | ||
sudo: false | ||
dist: xenial | ||
node_js: '10' | ||
addons: | ||
firefox: latest | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
cache: | ||
directories: | ||
- node_modules | ||
env: | ||
global: | ||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- env: JOB=benchmark | ||
include: | ||
- env: JOB=test KARMA_BROWSERS="Chrome,Firefox" | ||
before_script: | ||
- time npm run lint | ||
script: | ||
- xvfb-run time npm run test | ||
- env: JOB=benchmark | ||
script: | ||
- ./travis-bench.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
<!-- | ||
PRs should document their user-visible changes (if any) in the | ||
Unreleased section, uncommenting the header as necessary. | ||
--> | ||
|
||
<!-- ## Unreleased --> | ||
<!-- Add new unreleased items here --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2019 The Polymer Authors. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# mocha-suite-child | ||
|
||
Intended for use when running mocha in web-browsers, runs mocha test suites defined in HTML documents and include the results as if they are part of the main context. | ||
|
||
An example `.html` file using `mocha-suite-child` package to include 3 child suites in its run: | ||
|
||
```html | ||
<script src="./node_modules/mocha/mocha.js"></script> | ||
<!-- Load mocha-suite-child right after mocha for best results. --> | ||
<script src="./node_modules/mocha-suite-child/mocha-suite-child.js"></script> | ||
<script src="./node_modules/chai/chai.js"></script> | ||
<script> | ||
// Typical mocha setup bit. | ||
mocha.setup('tdd'); | ||
|
||
// Defines the children of the current mocha context. Note that | ||
// the same test suite files can be reused as children, with different | ||
// configurations. These must be defined at the top-level, i.e. | ||
// they can't be nested within Mocha's own `suite()` declarations. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add something here about how it creates an |
||
suiteChild('Juggling apples', './juggle.html?obj=apples'); | ||
suiteChild('Juggling chainsaws', './juggle.html?obj=chainsaws'); | ||
suiteChild('Bicycling tests', './bicycling.html'); | ||
|
||
// You can still have local tests defined here if you want. | ||
suite('A regular test suite', () => { | ||
test('A regular test', () => { | ||
chai.assert(true); | ||
}); | ||
}); | ||
|
||
// Returns a MochaSuiteChild.RunnerProxy if child suites are defined. | ||
// This is because the child suites *must* execute before the local | ||
// runner executes in order to satisfy the reporter's expectation | ||
// of accurate test totals. This RunnerProxy should work identically | ||
// to a Mocha.Runner for all intents and purposes. | ||
mocha.run(); | ||
</script> | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Karma configuration | ||
// Generated on Tue Sep 24 2019 11:48:17 GMT-0700 (PDT) | ||
const karmaBrowsers = | ||
(process.env.KARMA_BROWSERS || '').split(/ *, */).filter(Boolean); | ||
|
||
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: ['./mocha-suite-child.js', './test/test-suite.js'], | ||
|
||
// list of files / patterns to exclude | ||
exclude: [], | ||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: | ||
// https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: {}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['spec'], | ||
|
||
// web server port | ||
port: 9876, | ||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: false, | ||
|
||
// 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: karmaBrowsers, | ||
|
||
// 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 | ||
}) | ||
}; | ||
|
||
console.log('---'); | ||
console.log('KARMA_BROWSERS:', karmaBrowsers); | ||
console.log('---'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2019 The Polymer Project Authors. All rights reserved. | ||
* This code may only be used under the BSD style license found at | ||
* http://polymer.github.io/LICENSE.txt | ||
* The complete set of authors may be found at | ||
* http://polymer.github.io/AUTHORS.txt | ||
* The complete set of contributors may be found at | ||
* http://polymer.github.io/CONTRIBUTORS.txt | ||
* Code distributed by Google as part of the polymer project is also | ||
* subject to an additional IP rights grant found at | ||
* http://polymer.github.io/PATENTS.txt | ||
*/ | ||
const Koa = require('koa'); | ||
const mount = require('koa-mount'); | ||
const staticFiles = require('koa-static'); | ||
const { nodeResolve } = require('koa-node-resolve'); | ||
const { esmTransform } = require('koa-esm-transform'); | ||
|
||
module.exports = (karma) => new Koa() | ||
.use(esmTransform()) | ||
.use(mount('/base', new Koa().use(nodeResolve()).use(staticFiles('.')))) | ||
.use(karma); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const Koa = require('koa'); | ||
const { nodeResolve } = require('koa-node-resolve'); | ||
const { esmTransform } = require('koa-esm-transform'); | ||
const mount = require('koa-mount'); | ||
const staticFiles = require('koa-static'); | ||
new Koa() | ||
.use(esmTransform()) | ||
.use(mount('/base', new Koa().use(nodeResolve()).use(staticFiles('.')))) | ||
.listen(9000); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and includes