Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbilling committed Oct 20, 2024
1 parent 05719e8 commit b4881d1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
5 changes: 2 additions & 3 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ export default class App extends Application {
}

Ember.onerror = buildErrorHandler('Ember.onerror', (reason) => {
debugger;
throw reason;
// reportErrorToService(reason);
// whatever else you might want here...

// whatever else you might want here...
});

loadInitializers(App, config.modulePrefix);
9 changes: 5 additions & 4 deletions tests/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
setupRenderingTest as upstreamSetupRenderingTest,
setupTest as upstreamSetupTest,
} from 'ember-qunit';
import Ember from 'ember';

// This file exists to provide wrappers around ember-qunit's
// test setup functions. This way, you can easily extend the setup that is
Expand All @@ -28,11 +29,11 @@ function setupApplicationTest(hooks, options) {

setupTest(hooks);

hooks.beforeEach(function() {
Ember.onerror = function(error) {
throw error;
hooks.beforeEach(function () {
Ember.onerror = function (error) {
throw error;
};
});
});
}

function setupRenderingTest(hooks, options) {
Expand Down
7 changes: 3 additions & 4 deletions tests/integration/components/cloudinary-image-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from '../../helpers';
import { render, validateErrorHandler } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import {
import {
squelchErrorHandlerFor,
unsquelchAllErrorHandlers
unsquelchAllErrorHandlers,
} from 'ember-test-friendly-error-handler';

module('Integration | Component | cloudinary image', function (hooks) {
Expand All @@ -14,8 +14,7 @@ module('Integration | Component | cloudinary image', function (hooks) {
unsquelchAllErrorHandlers();
});

test('Ember.onerror is functioning properly', function(assert) {
debugger;
test('Ember.onerror is functioning properly', function (assert) {
let result = validateErrorHandler();
assert.ok(result.isValid, result.message);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/components/cloudinary-resource-list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { setupRenderingTest } from '../../helpers';
import { render, find } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import Pretender from 'pretender';
import {
import {
squelchErrorHandlerFor,
unsquelchAllErrorHandlers
unsquelchAllErrorHandlers,
} from 'ember-test-friendly-error-handler';

module('Integration | Component | cloudinary-resource-list', function (hooks) {
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/components/cloudinary-video-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from '../../helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import {
import {
squelchErrorHandlerFor,
unsquelchAllErrorHandlers
unsquelchAllErrorHandlers,
} from 'ember-test-friendly-error-handler';

module('Integration | Component | cloudinary video', function (hooks) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ setApplication(Application.create(config.APP));

setup(QUnit.assert);

start({ setupEmberOnerrorValidation : false });
start({ setupEmberOnerrorValidation: false });
5 changes: 2 additions & 3 deletions tests/unit/utils/variable-formatter-test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import variableFormatter from 'dummy/utils/variable-formatter';
import { module, test } from 'qunit';
import {
import {
squelchErrorHandlerFor,
unsquelchAllErrorHandlers
unsquelchAllErrorHandlers,
} from 'ember-test-friendly-error-handler';

module('Unit | Utility | variable formatter', function (hooks) {

hooks.afterEach(() => {
unsquelchAllErrorHandlers();
});
Expand Down

0 comments on commit b4881d1

Please sign in to comment.