Closed zhanwang626 closed 3 years ago
add transform to replace deprecated this.render() with render() from '@ember/test-helpers' package. Example: From
import { click } from '@ember/test-helpers'; test('It handles switching selected option on click and fires onSelect event', async function(assert) { this.onSelectMock = this.sandbox.stub(); await this.render(hbs` <Common::TimeCommitmentSelector @timeCommitmentOptions={{timeCommitmentOptionsMock}} @onSelect={{onSelectMock}}> </Common::TimeCommitmentSelector> `); })
to
import { click, render } from '@ember/test-helpers'; test('It handles switching selected option on click and fires onSelect event', async function(assert) { this.onSelectMock = this.sandbox.stub(); await render(hbs` <Common::TimeCommitmentSelector @timeCommitmentOptions={{timeCommitmentOptionsMock}} @onSelect={{onSelectMock}}> </Common::TimeCommitmentSelector> `); })
PASS transforms/find/test.js PASS transforms/native-dom/test.js PASS transforms/this-render-migration/test.js PASS transforms/acceptance/test.js PASS transforms/integration/test.js
Test Suites: 5 passed, 5 total Tests: 90 passed, 90 total Snapshots: 0 total Time: 3.301s, estimated 4s Ran all test suites matching /test/i.
https://github.com/ember-codemods/ember-test-helpers-codemod/releases/tag/v0.3.0
Description
add transform to replace deprecated this.render() with render() from '@ember/test-helpers' package. Example: From
to
Test
PASS transforms/find/test.js PASS transforms/native-dom/test.js PASS transforms/this-render-migration/test.js PASS transforms/acceptance/test.js PASS transforms/integration/test.js
Test Suites: 5 passed, 5 total Tests: 90 passed, 90 total Snapshots: 0 total Time: 3.301s, estimated 4s Ran all test suites matching /test/i.