Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.03 KB

File metadata and controls

47 lines (34 loc) · 1.03 KB

remove-onerror-assignments

Usage

npx ember-test-onerror-codemod remove-onerror-assignments path/of/files/ or/some**/*glob.js

# or

yarn global add ember-test-onerror-codemod
ember-test-onerror-codemod remove-onerror-assignments path/of/files/ or/some**/*glob.js

Input / Output


basic

Input (basic.input.js):

test('foo test', async function (assert) {
  assert.expect(1);

  Ember.onerror = function() {};
  Ember.onerror = () => {};
  Ember.onerror = fn;
});

Output (basic.output.js):

test('foo test', async function (assert) {
  assert.expect(1);

  setupOnerror(function() {});
  setupOnerror(() => {});
  setupOnerror(fn);
});