UNPKG

649 BTypeScriptView Raw
1declare module 'ember-testing/lib/helpers/visit' {
2 import type { TestableApp } from 'ember-testing/lib/ext/application';
3 /**
4 Loads a route, sets up any controllers, and renders any templates associated
5 with the route as though a real user had triggered the route change while
6 using your app.
7
8 Example:
9
10 ```javascript
11 visit('posts/index').then(function() {
12 // assert something
13 });
14 ```
15
16 @method visit
17 @param {String} url the name of the route
18 @return {RSVP.Promise<undefined>}
19 @public
20 */
21 export default function visit(app: TestableApp, url: string): unknown;
22}