-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9127d9f
commit bd89d96
Showing
5 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
packages/service-clients/end-to-end-tests/odsp-client/.mocharc.cjs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/service-clients/end-to-end-tests/odsp-client/src/test/.mocharc.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
"use strict"; | ||
|
||
const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common"); | ||
|
||
const packageDir = __dirname; | ||
const config = getFluidTestMochaConfig(packageDir); | ||
|
||
const args = process.argv.slice(2); | ||
|
||
function getFluidTestVariant() { | ||
const driverIndex = args.indexOf("--driver"); | ||
const endpointIndex = args.indexOf("--driverEndpoint"); | ||
|
||
const testDriver = driverIndex !== -1 ? args[driverIndex + 1] : ""; | ||
const endpointName = endpointIndex !== -1 ? args[endpointIndex + 1] : ""; | ||
|
||
return `${testDriver}-${endpointName}`; | ||
} | ||
|
||
function getFluidTestMocha(packageDir, additionalRequiredModules = []) { | ||
const testVariant = getFluidTestVariant(); | ||
process.env.FLUID_TEST_VARIANT = testVariant; | ||
|
||
return config(packageDir, additionalRequiredModules, testVariant); | ||
} | ||
|
||
module.exports = getFluidTestMocha; |