Merge pull request #6731 from mozilla/i6331
fix(tests): update from sinon reset to resetHistory
This commit is contained in:
Коммит
2719fc562e
|
@ -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()
|
||||
|
|
|
@ -285,7 +285,7 @@ describe('models/account', function () {
|
|||
|
||||
describe('signIn', () => {
|
||||
beforeEach(() => {
|
||||
notifier.trigger.reset();
|
||||
notifier.trigger.resetHistory();
|
||||
});
|
||||
|
||||
describe('with a password and no sessionToken', () => {
|
||||
|
@ -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 () {
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -567,7 +567,7 @@ define(function (require, exports, module) {
|
|||
|
||||
describe('_notifyBrokerAndComplete', () => {
|
||||
beforeEach(() => {
|
||||
notifier.trigger.reset();
|
||||
notifier.trigger.resetHistory();
|
||||
});
|
||||
|
||||
it('logs and notifies the broker', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fxa-content-server",
|
||||
"version": "1.124.0",
|
||||
"version": "1.125.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -47,8 +47,8 @@ registerSuite('geo-locate, geodb succeeds', {
|
|||
},
|
||||
|
||||
afterEach () {
|
||||
logger.error.reset();
|
||||
remoteAddress.reset();
|
||||
logger.error.resetHistory();
|
||||
remoteAddress.resetHistory();
|
||||
},
|
||||
|
||||
tests: {
|
||||
|
|
|
@ -41,7 +41,7 @@ registerSuite('routes/get-metrics-flow', {
|
|||
},
|
||||
|
||||
afterEach: function () {
|
||||
sandbox.reset();
|
||||
sandbox.resetHistory();
|
||||
},
|
||||
|
||||
tests: {
|
||||
|
|
|
@ -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 () {
|
||||
|
@ -147,7 +147,7 @@ registerSuite('routes/post-metrics', {
|
|||
|
||||
after: function () {
|
||||
Date.now.restore();
|
||||
sandbox.reset();
|
||||
sandbox.resetHistory();
|
||||
},
|
||||
|
||||
tests: {
|
||||
|
@ -232,7 +232,7 @@ registerSuite('routes/post-metrics', {
|
|||
|
||||
after() {
|
||||
Date.now.restore();
|
||||
sandbox.reset();
|
||||
sandbox.resetHistory();
|
||||
},
|
||||
tests: {
|
||||
'response.json was called': function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче