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

Add tests #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add tests #7

wants to merge 1 commit into from

Conversation

sonicdoe
Copy link

Adds tests for if an update is available and if the workflow is already up to date. Closes #1.

For each test, a temporary directory is created with a package.json and an info.plist. A fake registry server is set up (and configured via .npmrc) which always returns v2.0.0 as the latest version. The first test calls check.js with v1.0.0 and expects the subtext in info.plist to be updated. The second test runs with v2.0.0 and expects the subtext to remain the same.

Why use a random package name?

alfred-notifier caches the registry’s response using cache-conf. Using random package names allows the tests to run in parallel without interfering with the cache.

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

Successfully merging this pull request may close these issues.

None yet

2 participants