Skip to content
This repository was archived by the owner on Jul 6, 2018. It is now read-only.

Commit 4084edf

Browse files
committed
Add Controller and Route tests
The Controller and Route classes don't seem to be exporting all their members in the way the Controller is, but I'm lacking the bandwidth to spot the problem.
1 parent 8d01dbf commit 4084edf

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

types/ember/test/controller.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Controller from '@ember/controller';
2+
3+
class MyController extends Controller {
4+
queryParams = ['category'];
5+
category = null;
6+
isExpanded = false;
7+
8+
toggleBody() {
9+
this.toggleProperty('isExpanded');
10+
}
11+
}

types/ember/test/route.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Route from '@ember/routing/route';
2+
import Ember from 'ember';
3+
const { Logger } = Ember;
4+
5+
class Route1 extends Route {
6+
queryParams = {
7+
category: {
8+
refreshModel: true,
9+
},
10+
};
11+
templateName: 'posts/favorite-posts';
12+
}

types/ember/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"test/set.ts",
3131
"test/set-properties.ts",
3232
"test/computed.ts",
33-
"test/component.ts"
33+
"test/component.ts",
34+
"test/controller.ts",
35+
"test/route.ts"
3436
]
3537
}

0 commit comments

Comments
 (0)