Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastBoot.distPath returns deleted path upon running ember test #207

Closed
dnalagatla opened this issue Nov 18, 2019 · 2 comments
Closed

FastBoot.distPath returns deleted path upon running ember test #207

dnalagatla opened this issue Nov 18, 2019 · 2 comments

Comments

@dnalagatla
Copy link
Contributor

Not sure, if this is an issue with ember-cli-fastboot-testing addon but just wanted to report my observation. In my app code, in FastBoot only scenario, I am accessing the dist path using public getter FastBoot.distPath to get access to a Static JSON content.

The application works with issues upon running ember s and tests are passing upon using ember test --serve. But when I run just ember test then FastBoot.distPath usage failed as the path defined there is deleted.

Upon investigation, I noticed that ember test invokes the postBuild hook with broccoli temp path and deletes that path after a successful build. As a result use of FastBoot.distPath fails.

I have workaround by running ember build first and using the --path argument with ember test. But still wanted to check if there is any recommendation here for this use-case

@ryanto
Copy link
Member

ryanto commented Nov 25, 2019

Interesting... I wonder if postBuild is not the best hook to use then? To be honest, broccoli is all a mystery to me.

I'm happy to use another hook if you think that will help. Maybe going with your work around is also the best/correct way to solve this?

eoneill added a commit to eoneill/ember-cli-fastboot-testing that referenced this issue Jan 14, 2020
@ryanto ryanto closed this as completed in 2a6cd35 Jan 15, 2020
@ryanto
Copy link
Member

ryanto commented Jan 15, 2020

Ok this should be fixed in 0.2.4 thanks to @eoneill

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

No branches or pull requests

2 participants