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

change TestAdapter to utilize the AbstractAutomationAdapter from the environment package #46

Closed
regevbr opened this issue Jul 23, 2018 · 1 comment
Labels

Comments

@regevbr
Copy link

regevbr commented Jul 23, 2018

Need to wait for yeoman/environment#102 to be published.
TestAdapter can be rewritten like so:

'use strict';

var sinon = require('sinon');
const AbstractAutomationAdapter = require('yeoman-enviormnet/automation/abstract-automation-adapter');

const diffHandler = sinon.spy();

const logFactory = {
  createLog() {
    return sinon.spy();
  },
  createLogMethod(log) {
    return function () {
      return sinon.stub().returns(log);
    };
  }
};

class TestAdapter extends AbstractAutomationAdapter {

  constructor(answers) {
    super(diffHandler, answers, logFactory);
  }

}

module.exports = TestAdapter;
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2020

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days

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

No branches or pull requests

1 participant