mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
This PR move codes from main.ts into two new plugins: - splashscreen (formerly known as py-loader) - importmap The old setting config.autoclose_loader is still supported but deprecated; the new setting is config.splashscreen.autoclose. Moreover, it does a small refactoring around UserError: now UserErrors are correctly caught even if they are raised from within afterRuntimeLoad.
24 lines
577 B
JavaScript
24 lines
577 B
JavaScript
//jest.config.js
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'jest-environment-jsdom',
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
transform: {
|
|
'^.+\\.tsx?$': [
|
|
'ts-jest',
|
|
{
|
|
tsconfig: 'tsconfig.json',
|
|
useESM: true,
|
|
},
|
|
],
|
|
},
|
|
verbose: true,
|
|
testEnvironmentOptions: {
|
|
url: 'http://localhost',
|
|
},
|
|
moduleNameMapper: {
|
|
'^[./a-zA-Z0-9$_-]+\\.py$': '<rootDir>/__mocks__/fileMock.js',
|
|
'\\.(css)$': '<rootDir>/__mocks__/cssMock.js',
|
|
},
|
|
};
|