Files
slippi-launcher/jest.config.js

26 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

Migrate boilerplate to ERB (#260) * refactor: initial erb migration * feat: use native twitter feed * fix disable background click warning * fix static imports * fix key * dont import path from renderer * add missing eslint changes * fix .env variables not existing in dev main * fix lint * fix asset path fetching in prod * fix: table rows being wierd after electron update * fix file assets not working in production * fix: tsconfig paths in jest * update assets * add notarization script * add build assets * fix build package info * fix remaining build discrepencies * remove erb images * import pkg only once * deps: update electron * update menu builder * fix open dialog not working * fix vscode settings * update type deps * fix type issues * restore slippi protocol handling * disable asar for now since it breaks workers * fix icons looking weird * fix app product name * attempt to fix build breaking in ci * lets see if re-enabling asar fixes ci build * try fix ci again * ci plz * sigh... try the use hard links hack again :c * 🤞 * add appVersion as a constant * feat: use gql backend for user id validation * remove references to SLIPPI_USER_SERVER * feat: restore menu options * use .env when packaging * restore user id format check * only include images folder as assets when packaging * feat: use require.context for character and stage images * move file drag image back to assets and update extra resources path * copy log paths to clipboard * restore install app on quit behaviour * remove old dolphin/index.ts file * remove unused import * use react.memo for twitter feed. not sure it makes a difference * fix: mui deprecation warning * restore productName in package.json * fix: copy logs by correcting paths for windows at least * restore metal flag on mac * fix lint * attempt to fix mac menu stuff * hide .env warning when running yarn * Revert "copy log paths to clipboard" This reverts commit ccee9e39eb6b52f09cc6fc588a9d30fa82b5799d. * fix thing?? * actually fix missing .env warning * add missing type packages * export platform related constants via context bridge * try fix settings bug * Revert "restore metal flag on mac" This reverts commit cb6a26c34ce8be8815653d616833804ba16d8357. * attempt to fix frozen settings bug * remove boilerplate demo code * fix: attempt to fix stuck settings page bug. i've a hunch it happens because the last page is also the settings page so when you close the settings page, it takes you back to the settings page and then you just get stuck in an endless loop. hopefully this fixes it for good. * fix: hopefully fix notarization in next branch * fix: add missing load macos certs script * fix: stuck settings page * Revert "fix: attempt to fix stuck settings page bug." This reverts commit 5c87c609cf94b2f182619a03b293c3fae7fcf1ee. * deps: downgrade Electron from 16 to 13. V13 is the last known version to have a working native file drop functionality. At first glance it seemed like only the icon wasn't showing when dragging a file, however it turns out on MacOS, dragging a file ends up dragging the entire BrowserWindow. This makes the feature pretty much unusable. And so unfortunately we'll have to downgrade by 3 major versions cuz the file drag and drop is a critical feature. * fix: macOS native file drag to drag entire BrowserWindow * chore: allow users to install the app locally without admin * chore: update browserslist database * chore: set current electron version as browserslist * remove old counter path * chore: fix conflicting prettier and eslint rules * chore: add lint fix script Co-authored-by: Nikhil Narayana <nikhil.narayana@live.com>
2022-03-07 17:50:10 +11:00
const path = require("path");
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig.json");
module.exports = {
roots: ["<rootDir>/src"],
testTimeout: 300000, // 5 minutes in milliseconds
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
verbose: true,
Migrate boilerplate to ERB (#260) * refactor: initial erb migration * feat: use native twitter feed * fix disable background click warning * fix static imports * fix key * dont import path from renderer * add missing eslint changes * fix .env variables not existing in dev main * fix lint * fix asset path fetching in prod * fix: table rows being wierd after electron update * fix file assets not working in production * fix: tsconfig paths in jest * update assets * add notarization script * add build assets * fix build package info * fix remaining build discrepencies * remove erb images * import pkg only once * deps: update electron * update menu builder * fix open dialog not working * fix vscode settings * update type deps * fix type issues * restore slippi protocol handling * disable asar for now since it breaks workers * fix icons looking weird * fix app product name * attempt to fix build breaking in ci * lets see if re-enabling asar fixes ci build * try fix ci again * ci plz * sigh... try the use hard links hack again :c * 🤞 * add appVersion as a constant * feat: use gql backend for user id validation * remove references to SLIPPI_USER_SERVER * feat: restore menu options * use .env when packaging * restore user id format check * only include images folder as assets when packaging * feat: use require.context for character and stage images * move file drag image back to assets and update extra resources path * copy log paths to clipboard * restore install app on quit behaviour * remove old dolphin/index.ts file * remove unused import * use react.memo for twitter feed. not sure it makes a difference * fix: mui deprecation warning * restore productName in package.json * fix: copy logs by correcting paths for windows at least * restore metal flag on mac * fix lint * attempt to fix mac menu stuff * hide .env warning when running yarn * Revert "copy log paths to clipboard" This reverts commit ccee9e39eb6b52f09cc6fc588a9d30fa82b5799d. * fix thing?? * actually fix missing .env warning * add missing type packages * export platform related constants via context bridge * try fix settings bug * Revert "restore metal flag on mac" This reverts commit cb6a26c34ce8be8815653d616833804ba16d8357. * attempt to fix frozen settings bug * remove boilerplate demo code * fix: attempt to fix stuck settings page bug. i've a hunch it happens because the last page is also the settings page so when you close the settings page, it takes you back to the settings page and then you just get stuck in an endless loop. hopefully this fixes it for good. * fix: hopefully fix notarization in next branch * fix: add missing load macos certs script * fix: stuck settings page * Revert "fix: attempt to fix stuck settings page bug." This reverts commit 5c87c609cf94b2f182619a03b293c3fae7fcf1ee. * deps: downgrade Electron from 16 to 13. V13 is the last known version to have a working native file drop functionality. At first glance it seemed like only the icon wasn't showing when dragging a file, however it turns out on MacOS, dragging a file ends up dragging the entire BrowserWindow. This makes the feature pretty much unusable. And so unfortunately we'll have to downgrade by 3 major versions cuz the file drag and drop is a critical feature. * fix: macOS native file drag to drag entire BrowserWindow * chore: allow users to install the app locally without admin * chore: update browserslist database * chore: set current electron version as browserslist * remove old counter path * chore: fix conflicting prettier and eslint rules * chore: add lint fix script Co-authored-by: Nikhil Narayana <nikhil.narayana@live.com>
2022-03-07 17:50:10 +11:00
testEnvironment: "jsdom",
transform: {
2023-11-12 13:59:23 +11:00
"\\.(ts|tsx|js|jsx)$": ["ts-jest", { diagnostics: false }],
Migrate boilerplate to ERB (#260) * refactor: initial erb migration * feat: use native twitter feed * fix disable background click warning * fix static imports * fix key * dont import path from renderer * add missing eslint changes * fix .env variables not existing in dev main * fix lint * fix asset path fetching in prod * fix: table rows being wierd after electron update * fix file assets not working in production * fix: tsconfig paths in jest * update assets * add notarization script * add build assets * fix build package info * fix remaining build discrepencies * remove erb images * import pkg only once * deps: update electron * update menu builder * fix open dialog not working * fix vscode settings * update type deps * fix type issues * restore slippi protocol handling * disable asar for now since it breaks workers * fix icons looking weird * fix app product name * attempt to fix build breaking in ci * lets see if re-enabling asar fixes ci build * try fix ci again * ci plz * sigh... try the use hard links hack again :c * 🤞 * add appVersion as a constant * feat: use gql backend for user id validation * remove references to SLIPPI_USER_SERVER * feat: restore menu options * use .env when packaging * restore user id format check * only include images folder as assets when packaging * feat: use require.context for character and stage images * move file drag image back to assets and update extra resources path * copy log paths to clipboard * restore install app on quit behaviour * remove old dolphin/index.ts file * remove unused import * use react.memo for twitter feed. not sure it makes a difference * fix: mui deprecation warning * restore productName in package.json * fix: copy logs by correcting paths for windows at least * restore metal flag on mac * fix lint * attempt to fix mac menu stuff * hide .env warning when running yarn * Revert "copy log paths to clipboard" This reverts commit ccee9e39eb6b52f09cc6fc588a9d30fa82b5799d. * fix thing?? * actually fix missing .env warning * add missing type packages * export platform related constants via context bridge * try fix settings bug * Revert "restore metal flag on mac" This reverts commit cb6a26c34ce8be8815653d616833804ba16d8357. * attempt to fix frozen settings bug * remove boilerplate demo code * fix: attempt to fix stuck settings page bug. i've a hunch it happens because the last page is also the settings page so when you close the settings page, it takes you back to the settings page and then you just get stuck in an endless loop. hopefully this fixes it for good. * fix: hopefully fix notarization in next branch * fix: add missing load macos certs script * fix: stuck settings page * Revert "fix: attempt to fix stuck settings page bug." This reverts commit 5c87c609cf94b2f182619a03b293c3fae7fcf1ee. * deps: downgrade Electron from 16 to 13. V13 is the last known version to have a working native file drop functionality. At first glance it seemed like only the icon wasn't showing when dragging a file, however it turns out on MacOS, dragging a file ends up dragging the entire BrowserWindow. This makes the feature pretty much unusable. And so unfortunately we'll have to downgrade by 3 major versions cuz the file drag and drop is a critical feature. * fix: macOS native file drag to drag entire BrowserWindow * chore: allow users to install the app locally without admin * chore: update browserslist database * chore: set current electron version as browserslist * remove old counter path * chore: fix conflicting prettier and eslint rules * chore: add lint fix script Co-authored-by: Nikhil Narayana <nikhil.narayana@live.com>
2022-03-07 17:50:10 +11:00
},
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/.erb/mocks/fileMock.js",
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: path.join("<rootDir>/", compilerOptions.baseUrl) }),
},
moduleFileExtensions: ["js", "jsx", "ts", "tsx", "json"],
moduleDirectories: ["node_modules", "release/app/node_modules"],
testPathIgnorePatterns: ["release/app/dist"],
setupFiles: ["./.erb/scripts/check-build-exists.ts"],
transformIgnorePatterns: ["node_modules/(?!is-ip|ip-regex|super-regex|function-timeout|time-span|convert-hrtime|is-regexp|clone-regexp)"],
};