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

Commit

Permalink
Add Controller and Route tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
theroncross committed Aug 29, 2017
1 parent 8d01dbf commit 4084edf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
11 changes: 11 additions & 0 deletions types/ember/test/controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Controller from '@ember/controller';

class MyController extends Controller {
queryParams = ['category'];
category = null;
isExpanded = false;

toggleBody() {
this.toggleProperty('isExpanded');
}
}
12 changes: 12 additions & 0 deletions types/ember/test/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Route from '@ember/routing/route';
import Ember from 'ember';
const { Logger } = Ember;

class Route1 extends Route {
queryParams = {
category: {
refreshModel: true,
},
};
templateName: 'posts/favorite-posts';
}
4 changes: 3 additions & 1 deletion types/ember/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"test/set.ts",
"test/set-properties.ts",
"test/computed.ts",
"test/component.ts"
"test/component.ts",
"test/controller.ts",
"test/route.ts"
]
}

0 comments on commit 4084edf

Please sign in to comment.