Skip to content

Commit

Permalink
fix(karma): reduce logging
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed May 29, 2019
1 parent 852a6be commit f878282
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
8 changes: 7 additions & 1 deletion test/karma/karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ const localLaunchers = {
},
'Firefox': {
base: 'Firefox'
}
},
// IEGeneral: {
// base: 'IE'
// },
// EdgeGeneral: {
// base:'Edge'
// }
};

module.exports = function(config) {
Expand Down
10 changes: 5 additions & 5 deletions test/karma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
"devDependencies": {
"@stencil/sass": "^0.2.0",
"jasmine-core": "^3.4.0",
"karma": "^2.0.0",
"karma": "^4.1.0",
"karma-browserstack-launcher": "^1.5.1",
"karma-chrome-launcher": "^2.2.0",
"karma-edge-launcher": "^0.4.2",
"karma-firefox-launcher": "^1.1.0",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^1.1.1",
"karma-jasmine": "^2.0.1",
"karma-polyfill": "^1.0.0",
"karma-safari-launcher": "^1.0.0",
"karma-typescript": "^4.0.0",
"puppeteer": "^1.14.0",
"puppeteer": "^1.17.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1",
"webpack": "^4.32.2",
"webpack-cli": "^3.3.2",
"workbox-build": "4.3.1"
}
}
7 changes: 1 addition & 6 deletions test/karma/test-app/input-basic/cmp-root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Element, h, Prop, Watch } from '@stencil/core';
import { Component, Element, h, Prop } from '@stencil/core';

@Component({
tag: 'input-basic-root'
Expand All @@ -7,13 +7,8 @@ export class InputBasicRoot {

@Element() el!: HTMLElement;
@Prop({ mutable: true }) value?: string;
@Watch('value')
onValueChanges(v: any) {
console.log('onValueChanges', v);
}

render() {
console.log('render');
return (
<div>
<input type="text" value={this.value} onInput={(ev: any) => this.value = ev.target.value}></input>
Expand Down
4 changes: 0 additions & 4 deletions test/karma/test-app/legacy-context/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,4 @@ export class LegacyContextRoot {
myService: this.myService
}
}

async componentWillLoad() {
console.log(await this.getData());
}
}
8 changes: 4 additions & 4 deletions test/karma/test-app/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ export function setupDomTests(document: Document) {

window.addEventListener('stencil_appload', appLoad);

function scriptErrored(ev: any) {
console.error('script error', ev);
}
// function scriptErrored(ev: any) {
// console.error('script error', ev);
// }

const tmpScripts = app.querySelectorAll('script') as NodeListOf<HTMLScriptElement>;
for (let i = 0; i < tmpScripts.length; i++) {
Expand All @@ -112,7 +112,7 @@ export function setupDomTests(document: Document) {
}
script.innerHTML = tmpScripts[i].innerHTML;

script.addEventListener('error', scriptErrored);
// script.addEventListener('error', scriptErrored);

tmpScripts[i].parentNode!.insertBefore(script, tmpScripts[i]);
tmpScripts[i].parentNode!.removeChild(tmpScripts[i]);
Expand Down

0 comments on commit f878282

Please sign in to comment.