Open
Description
If tests are added with <script>
(which is the case with karma), the nextTick()
callback may be processed before loading a test that has the .only
property. In such case, the first tests will be executed.
E.g.
<script type="text/javascript" src="test1.js" ></script>
<script type="text/javascript" src="test2.js" ></script>
<script type="text/javascript" src="test3.js" ></script>
...
<script type="text/javascript" src="test23.js" ></script>
// at this time, maybe JRE is processing the timeouts, hence first tests are ran
<script type="text/javascript" src="test24.js" ></script>
<script type="text/javascript" src="test25.js" ></script>
...
<script type="text/javascript" src="test53.js" ></script>
<script type="text/javascript" src="testwith.only().js" ></script> // by the time, this script is parsed, many tests have already been executed
...
<script type="module">window.__karma__.loaded()</script>
Adding defer
or async
does not change anything.
Metadata
Metadata
Assignees
Labels
No labels