mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Ensure to not send track requests when testing
This commit is contained in:
parent
f2588b69c4
commit
762df07512
@ -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()', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user