generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
176a916
commit 88f0801
Showing
3 changed files
with
11 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
export default async function mockAiCoreEnvVariable() { | ||
/** | ||
* This file is used to mock the environment variables that are required for the tests. | ||
*/ | ||
export default async function mockAiCoreEnvVariable(): Promise<void> { | ||
const aiCoreServiceCredentials = { | ||
clientid: 'clientid', | ||
clientsecret: 'clientsecret', | ||
url: 'https://example.authentication.eu12.hana.ondemand.com', | ||
serviceurls: { | ||
AI_API_URL: 'https://api.ai.ml.hana.ondemand.com' | ||
} | ||
} | ||
}; | ||
process.env['aicore'] = JSON.stringify(aiCoreServiceCredentials); | ||
} |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
export default async function tearDown() { | ||
/** | ||
* This file is used to run code after all tests have been run. | ||
*/ | ||
export default async function tearDown(): Promise<void> { | ||
delete process.env.aicore; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
}, | ||
"include": ["packages/**/*.ts", "test-util/**/*.ts"], | ||
"exclude": ["dist/**/*", "node_modules/**/*"] | ||
} | ||
} |