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

Decaffeinate help spec #74

Merged
merged 2 commits into from
May 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions spec/help-spec.coffee

This file was deleted.

91 changes: 43 additions & 48 deletions spec/help-spec.js
Original file line number Diff line number Diff line change
@@ -1,61 +1,56 @@
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const apm = require('../lib/apm-cli');

describe('command help', function() {
beforeEach(function() {
describe('command help', () => {
beforeEach(() => {
spyOnToken();
return silenceOutput();
silenceOutput();
});

describe("apm help publish", () => it("displays the help for the command", function() {
const callback = jasmine.createSpy('callback');
apm.run(['help', 'publish'], callback);

waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);

return runs(function() {
expect(console.error.callCount).toBeGreaterThan(0);
return expect(callback.mostRecentCall.args[0]).toBeUndefined();
describe('apm help publish', () => {
it('displays the help for the command', () => {
const callback = jasmine.createSpy('callback');
apm.run(['help', 'publish'], callback);
waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
runs(() => {
expect(console.error.callCount).toBeGreaterThan(0);
expect(callback.mostRecentCall.args[0]).toBeUndefined();
});
});
}));

describe("apm publish -h", () => it("displays the help for the command", function() {
const callback = jasmine.createSpy('callback');
apm.run(['publish', '-h'], callback);

waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
});

return runs(function() {
expect(console.error.callCount).toBeGreaterThan(0);
return expect(callback.mostRecentCall.args[0]).toBeUndefined();
describe('apm publish -h', () => {
it('displays the help for the command', () => {
const callback = jasmine.createSpy('callback');
apm.run(['publish', '-h'], callback);
waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
runs(() => {
expect(console.error.callCount).toBeGreaterThan(0);
expect(callback.mostRecentCall.args[0]).toBeUndefined();
});
});
}));

describe("apm help", () => it("displays the help for apm", function() {
const callback = jasmine.createSpy('callback');
apm.run(['help'], callback);

waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
});

return runs(function() {
expect(console.error.callCount).toBeGreaterThan(0);
return expect(callback.mostRecentCall.args[0]).toBeUndefined();
describe('apm help', () => {
it('displays the help for apm', () => {
const callback = jasmine.createSpy('callback');
apm.run(['help'], callback);
waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
runs(() => {
expect(console.error.callCount).toBeGreaterThan(0);
expect(callback.mostRecentCall.args[0]).toBeUndefined();
});
});
}));

return describe("apm", () => it("displays the help for apm", function() {
const callback = jasmine.createSpy('callback');
apm.run([], callback);

waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
});

return runs(function() {
expect(console.error.callCount).toBeGreaterThan(0);
return expect(callback.mostRecentCall.args[0]).toBeUndefined();
describe('apm', () => {
it('displays the help for apm', () => {
const callback = jasmine.createSpy('callback');
apm.run([], callback);
waitsFor('waiting for help to complete', 60000, () => callback.callCount === 1);
runs(() => {
expect(console.error.callCount).toBeGreaterThan(0);
expect(callback.mostRecentCall.args[0]).toBeUndefined();
});
});
}));
});
});