Sha256: e79ea0cfadefa8dc325aa01c8f4f3c50ca4736fb63e02901d975d4706de5dcd9

Contents?: true

Size: 530 Bytes

Versions: 1

Compression:

Stored size: 530 Bytes

Contents

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

/**
  Returns the current path.

Example:

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

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

@method currentPath
@return {Object} The currently active path.
@since 1.5.0
@public
*/
export default function currentPath(app) {
  let routingService = app.__container__.lookup('service:-routing');
  return get(routingService, 'currentPath');
}

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_path.js