question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect "Your mutator cannot be loaded so default setup has been applied" warning?

See original GitHub issue

What are the steps to reproduce this issue?

  1. Create custom mutator (in my case: custom-axios-instance.ts based on the examples)
  2. Add a local import on top of it, e.g.: import { trackData } from '../../utils/trackData';
  3. Generate the API client

What happens?

The following warning is shown:

Your mutator cannot be loaded so default setup has been applied" warning

What were you expecting to happen?

Looking at the mutator.ts code, I am not sure if this warning should be shown:

    if (!cached) {
      createLogger().warn(
        chalk.yellow(
          `Your mutator cannot be loaded so default setup has been applied => ${importPath}`,
        ),
      );
    }

If my understanding is correct, in this case a file has been correctly loaded and returned but it just hasn’t been found in the cache at the time of loading that file. Is that understanding correct?

What versions are you using?

Operating System: macOS 10.15.7 Package Version: 6.3.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
yekvercommented, Feb 16, 2022

@anymaniax Great changes, thank you!

I’ve already review them and I think we missed this part:

Also I’d recommend to change the severity from warning to error with message Failed to parse provided mutator function. Current behaviour is confusing, mutator wasn’t loaded correctly but despite this it’s used in a generated code.

1reaction
anymaniaxcommented, Feb 15, 2022

I have a solution and currently on it

Read more comments on GitHub >

github_iconTop Results From Across the Web

stryker-mutator/stryker - Gitter
I am using es6 modules with karma and the mutators seem to not have been applied but when I manually apply one, the...
Read more >
Configuration | Stryker Mutator
You run stryker from the test project directory. On some dotnet core projects stryker can run without specifying any custom configuration. Simply run...
Read more >
Steam 社群 :: 指南 :: Dedicated Server Secrets, Tips, Fixes, Tutorials ...
This warning can also occur if you launch your server twice by mistake. ... Your second server's config files were modified to have...
Read more >
@stryker-mutator/core - npm
This is generally used to transpile your code before testing. Only configure this if your test runner doesn't take care of this already...
Read more >
FAQ - PIT Mutation Testing
PIT found no classes to mutate / no tests to run. What am I doing wrong? ... Make sure that your code and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found