Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Ensure APM_TEST_PACKAGES may be activated in Jasmine specs - #18984

Merged
smashwilson merged 2 commits into
masterfrom
aw/respect-test-packages
Mar 14, 2019
Merged

smashwilson merged 2 commits into
masterfrom
aw/respect-test-packages

Conversation

@smashwilson

Copy link
Copy Markdown
Contributor

Requirements for Contributing a Bug Fix

Identify the Bug

Part of the solution to #18983.

Description of the Change

If the test runner environment of the default Jasmine runner includes APM_TEST_PACKAGES, the packages named there will be symlinked (or, if that fails, copied) to the temporary Atom home used for the current run.

Alternate Designs

@Arcanemagus spelled out some of the other alternatives in #18983. This was the quickest to implement, but should cover the immediate problem. I'm still open to doing the other suggestions (in addition to this one), especially if we hear from more people.

Possible Drawbacks

It's possible that a user has APM_TEST_PACKAGES set in their environment, but doesn't intend to have those packages available to their test suites.

If a user is running apm install to install package prerequisites manually in CI, this will still fail.

Verification Process

  1. Clone AtomLinter/linter-bailey and ran apm ci.
  2. Install language-bailey with apm install language-bailey.
  3. Run the package specs with atom --test spec/.

The specs almost all fail when run with atom 1.37.0-nightly17, or when run with this PR active on the dev resource path without APM_TEST_PACKAGES set, but pass with this PR active and APM_TEST_PACKAGES=language-bailey.

Release Notes

  • The default Jasmine test runner allows you to activate packages listed in APM_TEST_PACKAGES.

@smashwilson
smashwilson merged commit 1cb2ccd into master Mar 14, 2019
@smashwilson
smashwilson deleted the aw/respect-test-packages branch March 14, 2019 01:22
smashwilson added a commit that referenced this pull request Mar 28, 2019
Ensure APM_TEST_PACKAGES may be activated in Jasmine specs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant