Import log instead of using it off of window
This commit is contained in:
parent
8eb0dd3116
commit
65ddf0a9e8
155 changed files with 3654 additions and 3433 deletions
|
@ -8,11 +8,11 @@ import FormData from 'form-data';
|
|||
import * as util from 'util';
|
||||
import * as zlib from 'zlib';
|
||||
|
||||
import { uploadDebugLogs } from '../../logging/debuglogs';
|
||||
import { upload } from '../../logging/debuglogs';
|
||||
|
||||
const gzip: (_: zlib.InputType) => Promise<Buffer> = util.promisify(zlib.gzip);
|
||||
|
||||
describe('uploadDebugLogs', () => {
|
||||
describe('upload', () => {
|
||||
beforeEach(function beforeEach() {
|
||||
this.sandbox = sinon.createSandbox();
|
||||
|
||||
|
@ -39,7 +39,7 @@ describe('uploadDebugLogs', () => {
|
|||
|
||||
it('makes a request to get the S3 bucket, then uploads it there', async function test() {
|
||||
assert.strictEqual(
|
||||
await uploadDebugLogs('hello world', '1.2.3'),
|
||||
await upload('hello world', '1.2.3'),
|
||||
'https://debuglogs.org/abc123.gz'
|
||||
);
|
||||
|
||||
|
@ -76,7 +76,7 @@ describe('uploadDebugLogs', () => {
|
|||
|
||||
let err: unknown;
|
||||
try {
|
||||
await uploadDebugLogs('hello world', '1.2.3');
|
||||
await upload('hello world', '1.2.3');
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ describe('uploadDebugLogs', () => {
|
|||
try {
|
||||
// Again, these should be run serially.
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await uploadDebugLogs('hello world', '1.2.3');
|
||||
await upload('hello world', '1.2.3');
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ describe('uploadDebugLogs', () => {
|
|||
|
||||
let err: unknown;
|
||||
try {
|
||||
await uploadDebugLogs('hello world', '1.2.3');
|
||||
await upload('hello world', '1.2.3');
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue