Skip to content

Commit

Permalink
Merge pull request #1100 from elwayman02/sinon-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
elwayman02 authored Aug 22, 2024
2 parents ac258ed + d23dd7a commit 0a21077
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/integration/modifiers/scroll-into-view-test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import { clearRender, render } from '@ember/test-helpers';
import { module, test } from 'qunit';

import { hbs } from 'ember-cli-htmlbars';
import { setupRenderingTest } from 'ember-qunit';
import sinon from 'sinon';

module('Integration | Modifier | scroll-into-view', function (hooks) {
setupRenderingTest(hooks);
const sandbox = sinon.createSandbox();

hooks.beforeEach(function () {
this.scrollIntoViewSpy = sandbox.spy(Element.prototype, 'scrollIntoView');
this.scrollIntoViewSpy = sinon.spy(Element.prototype, 'scrollIntoView');
});

hooks.afterEach(function () {
this.scrollIntoViewSpy = null;
sandbox.restore();
});

test('it renders and passes options when shouldScroll is true', async function (assert) {
Expand Down

0 comments on commit 0a21077

Please sign in to comment.