ember-test-helpers-codemod icon indicating copy to clipboard operation
ember-test-helpers-codemod copied to clipboard

update ember-test-helper-api-migration to support more case

Open zhanwang626 opened this issue 3 years ago • 0 comments
trafficstars

Previous ember-test-helper-api-migration transform does not support the following case: From

import { click } from '@ember/test-helpers';
import { TestContext } from 'ember-test-helpers';

    /** @type {TestContext['setProperties']} */
    let setProperties;

To

import { click, TestContext } from '@ember/test-helpers';

    /** @type {TestContext['setProperties']} */
    let setProperties;

Because there is no CallExpression contain TestContext, the TestContext specifier would be filtered by https://github.com/ember-codemods/ember-test-helpers-codemod/blob/master/transforms/utils.js#L366

This PR will fix above issue and update the README for this repo.

zhanwang626 avatar Jan 15 '22 06:01 zhanwang626