New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when executing test "Failed to fetch dynamically imported module" #2645
Comments
did you solve this @PRK0001 ? if so please share your solution ? |
no |
This happens to me randomly and makes my tests quite flaky. |
It is happening for me consistently. Does it Fixed? |
Struggled for many hours to get this to work with my Vite project, gave this a try https://github.com/remcovaes/web-test-runner-vite-plugin and things magically worked in less than 1 minute. This also means that my import maps from tsconfig is reused so that I don't have to duplicate them. |
Vite can do a lot of non-standard code transformations automatically |
I am now getting this error consistently with |
We are trying to replace karma by web-test-runner but I have the following errors when I am launching tests:
after running the browser in debug mode ,following errors had been displayed:
Versions:
"@esm-bundle/chai": "4.3.4",
"@web/test-runner": "^0.18.0",
"@web/test-runner-chrome": "^0.5.9",
Web test runner config:
import { esbuildPlugin } from '@web/dev-server-esbuild';
import { jasmineTestRunnerConfig } from 'web-test-runner-jasmine';
export default ({
...jasmineTestRunnerConfig(),
nodeResolve: true,
files: ['./test/*.spec.ts'],
browsers: ["Chrome_headless"],
customLaunchers: {
'Chrome_headless': {
base: 'Chrome',
flags: [
'--no-sandbox',
]
},
},
plugins: [esbuildPlugin({ ts: true, json: true, target: 'auto', sourceMap: true })]
});
Webpack config:
const path = require('path');
module.exports = {
mode: 'development',
entry: {
PowerBIEmbedTest: path.resolve('test/PowerBIEmbed.spec.tsx'),
utilsTest: path.resolve('test/utils.spec.ts'),
},
output: {
path: path.resolve('compiledTests'),
filename: '[name].spec.js'
},
devtool: 'source-map',
module: {
rules: [
{
test: /.ts(x)?$/,
loader: 'ts-loader',
options: {
configFile: path.resolve('config/test/tsconfig.json')
},
exclude: /node_modules/
},
]
},
resolve: {
extensions: [
'.tsx',
'.ts',
'.js'
]
},
};
The text was updated successfully, but these errors were encountered: