Skip to content

Commit

Permalink
fix e2e root dir path
Browse files Browse the repository at this point in the history
  • Loading branch information
devaradhanm committed Feb 6, 2019
1 parent 6b5f55a commit 1a03601
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/end-to-end/common/browser-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function verifyExtensionIsBuilt(extensionPath: string): Promise<void> {

async function launchNewBrowser(): Promise<Puppeteer.Browser> {
// only unpacked extension paths are supported
const extensionPath = `${__dirname}../../../../../drop/dev/extension/`;
const extensionPath = `${(global as any).rootDir}/drop/dev/extension/`;

// It's important that we verify this before calling Puppeteer.launch because its behavior if the
// extension can't be loaded is "the Chromium instance hangs with an alert and everything on Puppeteer's
Expand Down
4 changes: 4 additions & 0 deletions src/tests/end-to-end/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
const path = require('path');
var common = require('../jest.common.config');
const rootDir = '../../../';
const currentDir = '<rootDir>/src/tests/end-to-end';
Expand All @@ -19,4 +20,7 @@ module.exports = {
roots: ['<rootDir>/src/tests/end-to-end'],
reporters: ['default', ['jest-junit', { outputDirectory: '.', outputName: '<rootDir>/test-results/e2e/junit-e2e.xml' }]],
setupFilesAfterEnv: [`${currentDir}/setup/test-setup.ts`],
globals: {
rootDir: path.resolve(__dirname, rootDir),
},
};

0 comments on commit 1a03601

Please sign in to comment.