test: use delay() helper (#24321)
This commit is contained in:
parent
8eb198bab4
commit
1c49e4e376
9 changed files with 24 additions and 36 deletions
|
@ -11,6 +11,7 @@ import { EventEmitter } from 'events';
|
|||
import { closeWindow } from './window-helpers';
|
||||
import { emittedOnce } from './events-helpers';
|
||||
import { WebmGenerator } from './video-helpers';
|
||||
import { delay } from './spec-helpers';
|
||||
|
||||
const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures');
|
||||
|
||||
|
@ -33,12 +34,6 @@ const postData = {
|
|||
type: 'string'
|
||||
};
|
||||
|
||||
function delay (ms: number) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
function getStream (chunkSize = text.length, data: Buffer | string = text) {
|
||||
const body = new stream.PassThrough();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue