Skip to content

Commit

Permalink
[Main] Fix Perf Tests (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSNev committed Apr 21, 2023
1 parent d14c15b commit 7dbfe2e
Show file tree
Hide file tree
Showing 9 changed files with 434 additions and 106 deletions.
3 changes: 2 additions & 1 deletion AISKU/Tests/Perf/src/AISKUPerf.Tests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AITestClass, Assert } from "@microsoft/ai-test-framework";
import {AppInsightsInitPerfTestClass} from "./AISKUPerf";
import { AppInsightsInitPerfTestClass } from "./AISKUPerf";
import { utlRemoveSessionStorage } from "@microsoft/applicationinsights-common";

function isNullOrUndefined(value: any): boolean {
return value === undefined || value === null;
Expand Down
2 changes: 0 additions & 2 deletions AISKU/Tests/Perf/src/aiskuperftests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { AISKUPerf } from "./AISKUPerf.Tests";
//Do not remove this import, it will be used in browser.
import { Snippet } from "../../../src/Initialization";

export function runTests() {
new AISKUPerf().registerTests();
Expand Down
2 changes: 1 addition & 1 deletion AISKU/Tests/PerfTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

loadFetchModule(modules, "whatwg-fetch");
loadCommonModules(modules, function() {
var testModule = modules.add("Tests/Perf/src/aiskuperftests", "./Perf/dist/aiskuperftests.tests.js")
var testModule = modules.add("aiskuperftests", "./Perf/dist/es5/aiskuperftests.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
Expand Down
3 changes: 2 additions & 1 deletion AISKU/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"selenium-server-standalone-jar": "^3.141.5",
"serve-static": "^1.13.2",
"typescript": "^4.9.3",
"tslib": "^2.0.0"
"tslib": "^2.0.0",
"puppeteer": "19.2.0"
},
"peerDependencies": {
"tslib": "*"
Expand Down
2 changes: 1 addition & 1 deletion common/Tests/Framework/src/AITestClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class AITestClass {
self._assertHooksRemoved();
}

AITestClass.currentTestClass._testCompleted(failed);
AITestClass.currentTestClass && AITestClass.currentTestClass._testCompleted(failed);
done();
}

Expand Down
Loading

0 comments on commit 7dbfe2e

Please sign in to comment.