mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
52a1c65fe4
* Create a FileChooser component using showOpenFilePicker Before, `FileModal` always used a file input control for selecting local files. This allowed the emulator to read from the file, but precluded writing back to the file. With this change, the `FileModal` delegates to the new `FileChooser` component. The `FileChooser` will use `showOpenFilePicker` if it is available and a regular file input if it's not. Using `showOpenFilePicker` has the advantage of allowing the emulator to write back to the file (if the user grants permission). While the emulator does not yet take advantage of this write capability, that will come. * Addressed comments * useState() instead of direct DOM manipulation * backed out eslint changes in favor of suppressing the warning
28 lines
569 B
JavaScript
28 lines
569 B
JavaScript
module.exports = {
|
|
'moduleNameMapper': {
|
|
'^js/(.*)': '<rootDir>/js/$1',
|
|
'^test/(.*)': '<rootDir>/test/$1',
|
|
},
|
|
'roots': [
|
|
'js/',
|
|
'test/',
|
|
],
|
|
'testMatch': [
|
|
'**/?(*.)+(spec|test).+(ts|js|tsx)'
|
|
],
|
|
|
|
'transform': {
|
|
'^.+\\.js$': 'babel-jest',
|
|
'^.+\\.ts$': 'ts-jest',
|
|
'^.*\\.tsx$': 'ts-jest',
|
|
},
|
|
'setupFilesAfterEnv': [
|
|
'<rootDir>/test/jest-setup.js'
|
|
],
|
|
'coveragePathIgnorePatterns': [
|
|
'/node_modules/',
|
|
'/js/roms/',
|
|
'/test/',
|
|
]
|
|
};
|