Skip to content

Commit 3f87f6e

Browse files
Alexander VakrilovVasil Chimev
Alexander Vakrilov
authored and
Vasil Chimev
committed
fix(tests): value conversion and async test. (#1035)
1 parent f2a2e95 commit 3f87f6e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: tests/app/tests/list-view-tests.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe("ListView-tests", () => {
100100
});
101101

102102
it("setupItemView is called for every item", (done) => {
103-
return testApp.loadComponent(TestListViewComponent).then((componentRef) => {
103+
testApp.loadComponent(TestListViewComponent).then((componentRef) => {
104104
const component = componentRef.instance;
105105
setTimeout(() => {
106106
assert.equal(component.counter, 3);
@@ -112,9 +112,9 @@ describe("ListView-tests", () => {
112112

113113

114114
it("itemTemplateSelector selects templates", (done) => {
115-
return testApp.loadComponent(TestListViewSelectorComponent).then((componentRef) => {
115+
testApp.loadComponent(TestListViewSelectorComponent).then((componentRef) => {
116116
setTimeout(() => {
117-
assert.deepEqual(testTemplates, { first: 2, second: 1 });
117+
assert.deepEqual(testTemplates, { first: 2, second: 1 });
118118
done();
119119
}, 1000);
120120
})

Diff for: tests/app/tests/modal-dialog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe("modal-dialog", () => {
5050
let testApp: TestApp = null;
5151

5252
before((done) => {
53-
return TestApp.create([], [ModalComponent, FailComponent, SuccessComponent]).then((app) => {
53+
TestApp.create([], [ModalComponent, FailComponent, SuccessComponent]).then((app) => {
5454
testApp = app;
5555

5656
// HACK: Wait for the navigations from the test runner app

Diff for: tests/app/tests/property-sets.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ describe("setting View properties", () => {
4646
it("doesn\'t convert number values", () => {
4747
let view = new TestView();
4848
viewUtil.setProperty(view, "numValue", "42");
49-
assert.strictEqual(42, view.numValue);
49+
assert.strictEqual(<any>"42", view.numValue);
5050

5151
viewUtil.setProperty(view, "numValue", "42.");
52-
assert.strictEqual(42., view.numValue);
52+
assert.strictEqual(<any>"42.", <any>view.numValue);
5353

5454
viewUtil.setProperty(view, "numValue", 0);
5555
assert.strictEqual(0, view.numValue);
@@ -58,9 +58,9 @@ describe("setting View properties", () => {
5858
it("doesn\'t convert boolean values", () => {
5959
let view = new TestView();
6060
viewUtil.setProperty(view, "boolValue", "true");
61-
assert.strictEqual(true, view.boolValue);
61+
assert.strictEqual(<any>"true", view.boolValue);
6262
viewUtil.setProperty(view, "boolValue", "false");
63-
assert.strictEqual(false, view.boolValue);
63+
assert.strictEqual(<any>"false", view.boolValue);
6464
});
6565

6666
it("sets style values", () => {

0 commit comments

Comments
 (0)