Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
feat: add silentInstallation option (#156)
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Brix <tony@brix.ninja>
  • Loading branch information
aminya and UziTech committed Sep 21, 2020
1 parent 755114d commit 986f08b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ can be exported from your `atomTestRunner` script for Atom to consume.
- `testPackages` `[default: []]` - Array of packages to include for testing. This will usually be the same packages listed in [`APM_TEST_PACKAGES`](https://github.com/atom/ci#how-do-i-install-other-atom-packages-that-my-package-build-depends-on) if using atom/ci for continuous integration
- `random` `[default: false]` - Run your tests in semi-random order
- `seed` `[default: random]` - Sets the randomization seed if randomization is turned on
- `silentInstallation` `[default: false]` - Suppresses the spec helper installation messages

#### Spec Helpers
This will include Atom's [spec-helper](http://flight-manual.atom.io/hacking-atom/sections/writing-specs/#custom-matchers).
Expand Down
3 changes: 2 additions & 1 deletion lib/create-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const defaults = {
testPackages: [],
random: false,
seed: null,
silentInstallation: false
};

export default function createRunner(options = {}, configFunc) {
Expand Down Expand Up @@ -112,7 +113,7 @@ export default function createRunner(options = {}, configFunc) {
const promise = new Promise(resolve => {
resolveWithResult = resolve;
});
const setupView = new SetupView({ headless });
const setupView = new SetupView({ headless, silentInstallation: options.silentInstallation });

try {
const jasmine = new Jasmine();
Expand Down
2 changes: 1 addition & 1 deletion lib/setup-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class SetupView {
if (version) {
message = `${message}@${version}`;
}
if (this.props.headless) {
if (this.props.headless && !this.props.silentInstallation) {
console.log(message);
}
return this.update({ message });
Expand Down

0 comments on commit 986f08b

Please sign in to comment.