Ensure to not send track requests when testing

This commit is contained in:
Mariusz Nowak 2019-05-21 16:53:30 +02:00
parent f2588b69c4
commit 762df07512
No known key found for this signature in database
GPG Key ID: AA6F4CCD415BF299

View File

@ -10,6 +10,7 @@ const sinon = require('sinon');
const testUtils = require('../../../tests/utils');
const walkDirSync = require('../../utils/fs/walkDirSync');
const download = require('../../utils/downloadTemplateFromRepo');
const userStats = require('../../utils/userStats');
describe('Create', () => {
let create;
@ -21,6 +22,11 @@ describe('Create', () => {
create = new Create(serverless, options);
create.serverless.cli = new serverless.classes.CLI();
logSpy = sinon.spy(create.serverless.cli, 'log');
sinon.stub(userStats, 'track').resolves();
});
after(() => {
userStats.track.restore();
});
describe('#constructor()', () => {