Merge branch 'beta' of github.com:pagefaultgames/pokerogue into beta

This commit is contained in:
Frederico Santos 2024-07-13 02:22:12 +01:00
commit b2ced623fd
4 changed files with 23 additions and 10 deletions

View File

@ -4,3 +4,4 @@ VITE_SERVER_URL=http://localhost:8001
VITE_DISCORD_CLIENT_ID=1234567890
VITE_GOOGLE_CLIENT_ID=1234567890
VITE_I18N_DEBUG=1
VITE_PORT=8000

View File

@ -52,7 +52,10 @@ describe("Abilities - Quick Draw", () => {
expect(pokemon.battleData.abilitiesApplied).contain(Abilities.QUICK_DRAW);
}, 20000);
test("does not triggered by non damage moves", async () => {
test("does not triggered by non damage moves", {
timeout: 20000,
retry: 5
}, async () => {
await game.startBattle([Species.SLOWBRO]);
const pokemon = game.scene.getPlayerPokemon();
@ -67,7 +70,8 @@ describe("Abilities - Quick Draw", () => {
expect(pokemon.isFainted()).toBe(true);
expect(enemy.isFainted()).toBe(false);
expect(pokemon.battleData.abilitiesApplied).not.contain(Abilities.QUICK_DRAW);
}, 20000);
}
);
test("does not increase priority", async () => {
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.EXTREME_SPEED));

1
src/vite.env.d.ts vendored
View File

@ -1,6 +1,7 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_PORT?: string;
readonly VITE_BYPASS_LOGIN?: string;
readonly VITE_BYPASS_TUTORIAL?: string;
readonly VITE_API_BASE_URL?: string;

View File

@ -1,4 +1,4 @@
import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
export const defaultConfig = {
@ -20,10 +20,17 @@ export const defaultConfig = {
};
export default defineConfig(({mode}) => ({
export default defineConfig(({mode}) => {
const envPort = Number(loadEnv(mode, process.cwd()).VITE_PORT);
return ({
...defaultConfig,
esbuild: {
pure: mode === 'production' ? [ 'console.log' ] : [],
pure: mode === 'production' ? ['console.log'] : [],
keepNames: true,
},
}));
server: {
port: !isNaN(envPort) ? envPort : 8000,
}
});
});