karma-runner / karma-runner/karma

type attribute on included scripts is not preserved

Open
#2,967 0 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

### Expected behaviour

`type` attribute on included scripts should be preserved when client.runInParent is true and client.useIframe is false.

### Actual behaviour

The type attribute is removed.

### Environment Details

- Karma version (output of `karma --version`): 2.0.0
- Relevant part of your `karma.config.js` file: files property

### Steps to reproduce the behaviour

1. Create a basic Karma config
2. Include a file with the following options:
```
{
pattern: './file-to-include.js',
included: true,
served: true,
watched: true,
type: 'module'
}
```
3. Set client.runInParent to true and client.useIframe to false
4. Run Karma, inspect the scripts for the type attribute

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.