karma-runner / karma-runner/karma

Allow for dynamic loading of dependencies not specified in files array

Open
#2,966 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

As far as I understand it, I have to explicitly define all files in the `files` configuration array before they are allowed to be loaded into the browser...why is this necessary? I'm building a tool on top of karma, so I need to be able to dynamically allow tests to import all of their dependencies. Right now I cannot `fetch` or use ES Modules on files that are not explicitly defined in the `files` array, and I can imagine this becoming very cumbersome as the dependency graph of a file to test could be quite complex, visiting a variety of different paths that I might not know at build time.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how Karma validates and serves files listed in the `files` configuration array, then follow the browser loading path for `fetch` and ES Modules. Done means dependencies not explicitly listed in `files` can be dynamically loaded while preserving the runner's intended file-access boundaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.