Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
@angular/cli migration - update-karma-main-file
Browse files Browse the repository at this point in the history
Remove no longer needed require calls in Karma builder main file.
  • Loading branch information
sarunint committed May 19, 2023
1 parent c79ef08 commit 0850940
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {

// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare const __karma__: any;
declare const require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function () {};
Expand All @@ -26,9 +25,5 @@ getTestBed().initTestEnvironment(
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();

0 comments on commit 0850940

Please sign in to comment.