2018-03-01 13:41:35 -05:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2020-01-10 16:39:34 -05:00
|
|
|
import * as path from 'path';
|
2018-10-29 16:25:00 -04:00
|
|
|
|
2020-01-10 16:39:34 -05:00
|
|
|
// Resolve the path to the package.json of the ts-api-guardian. We need to resolve an actual
|
|
|
|
// path of a runfile because we want to determine the path to the directory that includes all
|
2018-10-29 16:25:00 -04:00
|
|
|
// test fixture runfiles. On Windows this is usually the original non-sandboxed disk location,
|
|
|
|
// otherwise this just refers to the runfile directory with all the proper symlinked files.
|
|
|
|
// TODO: remove the whole bootstrap file once the tests are Bazel and Windows compatible.
|
2020-01-10 16:39:34 -05:00
|
|
|
const runfilesDirectory = path.dirname(require.resolve('../package.json'));
|
|
|
|
|
|
|
|
process.chdir(runfilesDirectory);
|