Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(tests): update from sinon reset to resetHistory
Browse files Browse the repository at this point in the history
Fixes #6331
  • Loading branch information
vladikoff committed Nov 27, 2018
1 parent 58b8eaa commit 34377d4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/tests/spec/lib/translator.js
Expand Up @@ -52,7 +52,7 @@ define(function (require, exports, module) {
});

it('is not called on startup if translations are already set', () => {
xhr.getJSON.reset();
xhr.getJSON.resetHistory();
translator = new Translator({ xhr });
translator.set(TRANSLATIONS);
return translator.fetch()
Expand Down
8 changes: 4 additions & 4 deletions app/tests/spec/models/account.js
Expand Up @@ -285,7 +285,7 @@ describe('models/account', function () {

describe('signIn', () => {
beforeEach(() => {
notifier.trigger.reset();
notifier.trigger.resetHistory();
});

describe('with a password and no sessionToken', () => {
Expand Down Expand Up @@ -1006,7 +1006,7 @@ describe('models/account', function () {

describe('verifySignUp', function () {
beforeEach(() => {
notifier.trigger.reset();
notifier.trigger.resetHistory();
});

describe('with custom server verification value', function () {
Expand Down Expand Up @@ -1127,7 +1127,7 @@ describe('models/account', function () {

describe('signOut', () => {
beforeEach(() => {
notifier.trigger.reset();
notifier.trigger.resetHistory();
sinon.stub(fxaClient, 'sessionDestroy').callsFake(() => Promise.resolve());

account.set('sessionToken', SESSION_TOKEN);
Expand All @@ -1150,7 +1150,7 @@ describe('models/account', function () {

describe('destroy', function () {
beforeEach(function () {
notifier.trigger.reset();
notifier.trigger.resetHistory();
sinon.stub(fxaClient, 'deleteAccount').callsFake(function () {
return Promise.resolve();
});
Expand Down
2 changes: 1 addition & 1 deletion app/tests/spec/views/complete_sign_up.js
Expand Up @@ -567,7 +567,7 @@ define(function (require, exports, module) {

describe('_notifyBrokerAndComplete', () => {
beforeEach(() => {
notifier.trigger.reset();
notifier.trigger.resetHistory();
});

it('logs and notifies the broker', () => {
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/server/geo-locate.js
Expand Up @@ -47,8 +47,8 @@ registerSuite('geo-locate, geodb succeeds', {
},

afterEach () {
logger.error.reset();
remoteAddress.reset();
logger.error.resetHistory();
remoteAddress.resetHistory();
},

tests: {
Expand Down
2 changes: 1 addition & 1 deletion tests/server/routes/get-metrics-flow.js
Expand Up @@ -41,7 +41,7 @@ registerSuite('routes/get-metrics-flow', {
},

afterEach: function () {
sandbox.reset();
sandbox.resetHistory();
},

tests: {
Expand Down
6 changes: 3 additions & 3 deletions tests/server/routes/post-metrics.js
Expand Up @@ -105,7 +105,7 @@ registerSuite('routes/post-metrics', {

after() {
Date.now.restore();
sandbox.reset();
sandbox.resetHistory();
},
tests: {
'request.body was converted to an object': function () {
Expand Down Expand Up @@ -147,7 +147,7 @@ registerSuite('routes/post-metrics', {

after: function () {
Date.now.restore();
sandbox.reset();
sandbox.resetHistory();
},

tests: {
Expand Down Expand Up @@ -232,7 +232,7 @@ registerSuite('routes/post-metrics', {

after() {
Date.now.restore();
sandbox.reset();
sandbox.resetHistory();
},
tests: {
'response.json was called': function () {
Expand Down

0 comments on commit 34377d4

Please sign in to comment.