Skip to content

Commit 1488049

Browse files
chore: cleanup from review
- re-enable all tests in karma.conf.js - remove some diff noise
1 parent 22cf5c9 commit 1488049

File tree

3 files changed

+13
-22
lines changed

3 files changed

+13
-22
lines changed

Diff for: nativescript-angular/testing/src/nativescript_test_component_renderer.ts

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container";
99
*/
1010
@Injectable()
1111
export class NativeScriptTestComponentRenderer extends TestComponentRenderer {
12-
constructor() {
13-
super();
14-
}
1512

1613
insertRootElement(rootElId: string) {
1714
const page = topmost().currentPage;

Diff for: tests/app/tests/third-party.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// make sure you import mocha-config before @angular/core
2-
import {assert} from './test-config';
3-
import {Component, ComponentRef, Directive, TemplateRef, ViewContainerRef} from '@angular/core';
4-
import {View} from 'ui/core/view';
5-
import {Label} from 'ui/label';
6-
import {nTestBedAfterEach, nTestBedBeforeEach, nTestBedRender} from 'nativescript-angular/testing';
2+
import {assert} from "./test-config";
3+
import {Component, ComponentRef, Directive, TemplateRef, ViewContainerRef} from "@angular/core";
4+
import {View} from "ui/core/view";
5+
import {Label} from "ui/label";
6+
import {nTestBedAfterEach, nTestBedBeforeEach, nTestBedRender} from "nativescript-angular/testing";
77
// >> third-party-simple-view-registration
8-
import {registerElement} from 'nativescript-angular/element-registry';
8+
import {registerElement} from "nativescript-angular/element-registry";
99
registerElement("third-party-view", () => require("./third-party-view").SimpleTag);
1010
// << third-party-simple-view-registration
1111

@@ -48,18 +48,18 @@ export class DocumentFormComponent {
4848
})
4949
export class DocumentTitleDirective {
5050
public static titleLabel: Label;
51-
5251
constructor(
5352
private ownerForm: DocumentFormComponent,
5453
private viewContainer: ViewContainerRef,
55-
private template: TemplateRef<any>) {
54+
private template: TemplateRef<any>
55+
) {
5656
}
5757

5858
ngOnInit() {
5959
const viewRef = this.viewContainer.createEmbeddedView(this.template);
6060
// filter out whitespace nodes
6161
const titleViews = viewRef.rootNodes.filter((node) =>
62-
node && node.nodeName !== "#text");
62+
node && node.nodeName !== "#text");
6363

6464
if (titleViews.length > 0) {
6565
const titleView = titleViews[0];
@@ -73,9 +73,9 @@ export class DocumentTitleDirective {
7373
@Component({
7474
selector: "document-form-container",
7575
template: `
76-
<document-form src="document1.pdf">
77-
<Label *documentTitle text="Document1"></Label>
78-
</document-form>
76+
<document-form src="document1.pdf">
77+
<Label *documentTitle text="Document1"></Label>
78+
</document-form>
7979
`
8080
})
8181
export class DocumentFormContainer {

Diff for: tests/karma.conf.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ module.exports = function(config) {
1414
// list of files / patterns to load in the browser
1515
files: [
1616
'app/tests/test-main.js',
17-
//'app/**/*.js',
18-
'app/tests/list-view-tests.js',
19-
'app/tests/detached-loader-tests.js',
20-
'app/tests/modal-dialog.js',
21-
'app/tests/platform-filter-components.js',
22-
'app/tests/third-party.js',
23-
'app/tests/renderer-tests.js',
17+
'app/**/*.js'
2418
],
2519

2620

0 commit comments

Comments
 (0)