Sha256: 8526dbc38f417f84caa6770723b2947f9829c78ade22f2fc0f6bcee1f007bf4a

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

/**
@module ember
*/
import { get } from 'ember-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

2 entries across 2 versions & 1 rubygems

Version Path
discourse-ember-source-3.5.1.1 dist/es/ember-testing/lib/helpers/current_path.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-testing/lib/helpers/current_path.js