Sha256: d0e8947c818da2ccd4684c37b32bff47debe9c121183d0a06ed98c27375a92f8

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 Bytes

Contents

/**
@module ember
*/
import { get } from '@ember/-internals/metal';

/**
  Returns the current URL.

Example:

```javascript
function validateURL() {
  equal(currentURL(), '/some/path', "correct URL was transitioned into.");
}

click('#some-link-id').then(validateURL);
```

@method currentURL
@return {Object} The currently active URL.
@since 1.5.0
@public
*/
export default function currentURL(app) {
  let router = app.__container__.lookup('router:main');
  return get(router, 'location').getURL();
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/es/ember-testing/lib/helpers/current_url.js