Skip to content

Commit

Permalink
Fix typo in push
Browse files Browse the repository at this point in the history
  • Loading branch information
scinos committed Jun 25, 2021
1 parent c44ae86 commit 99c3353
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/e2e/lib/hooks/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ import { buildHooks as buildBrowserHooks } from './browser';

const startBrowserTimeoutMS = config.get( 'startBrowserTimeoutMS' );

// const tempDir =
// process.env.TEMP_ASSET_PATH || ( await mkdtemp( path.resolve( __dirname, '../../test-' ) ) );
let tempDir;
beforeAll(async () => {
tempDir = process.env.TEMP_ASSET_PATH || ( await mkdtemp( path.resolve( __dirname, '../../test-' ) ) );
});

if ( isVideoEnabled() ) {
const {
startFramebuffer,
stopFramebuffer,
// takeScreenshot,
// startVideoRecording,
startVideoRecording,
// saveVideoRecording,
stopVideoRecording,
} = buildVideoHooks();

beforeAll( async () => {
await startFramebuffer();
// await startVideoRecording( { tempDir } );
await startVideoRecording( { tempDir } );
} );

// afterEach( async () => {
Expand All @@ -41,20 +43,19 @@ if ( isVideoEnabled() ) {
// }
// } );

afterAll.push( async () => {
afterAll( async () => {
await stopFramebuffer();
await stopVideoRecording();
} );
}

const browserHooks = buildBrowserHooks();

beforeAll( async () => {
const driver = await browserHooks.createBrowser();
global.__BROWSER__ = driver;
}, startBrowserTimeoutMS );

afterAll( async () => {
// await browserHooks.saveBrowserLogs( { tempDir } );
await browserHooks.saveBrowserLogs( { tempDir } );
await browserHooks.closeBrowser();
} );

0 comments on commit 99c3353

Please sign in to comment.