Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Use absolute path in acceptance test blueprints #109

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

Dhaulagiri
Copy link
Contributor

Avoids issues with nested acceptance tests having invalid relative paths in them.

For instance, ember g acceptance-test foo/bar currently results in:

import startApp from '../helpers/start-app'

when it should be

import startApp from '../../helpers/start-app'.

After this change it will be the below which should work regardless of how deeply nested (or not) the acceptance test is:

import startApp from 'app-name/tests/helpers/start-app'

Avoids issues with nested acceptance tests having invalid relative
paths in them
@rwjblue
Copy link
Member

rwjblue commented May 12, 2016

We should keep in sync with the QUnit blueprints, what do they do in this scenario?

@Dhaulagiri
Copy link
Contributor Author

QUnit uses a moduleForAcceptance helper that it references via an absolute path:

ember g acceptance-test foo/bar

import moduleForAcceptance from 'qunit-test/tests/helpers/module-for-acceptance';
moduleForAcceptance('Acceptance | foo/bar');

@Dhaulagiri
Copy link
Contributor Author

(would probably be good to, at some point, implement a similar helper for ember-cli-mocha)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants