Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Dec 4, 2024
1 parent 3e51e24 commit a1b2788
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/brisa/src/cli/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ describe('cli', () => {
mockLog.mockRestore();
mock.restore();
globalThis.mockConstants = undefined;
process.env.QUIET_MODE = undefined;
});

it('should remove the content of build directory if it exists (except _brisa)', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const i18nCode = 3653;
const brisaSize = 5638; // TODO: Reduce this size :/
const webComponents = 1118;
const unsuspenseSize = 213;
const rpcSize = 2500; // TODO: Reduce this size
const rpcSize = 2509; // TODO: Reduce this size
const lazyRPCSize = 4105; // TODO: Reduce this size
// lazyRPC is loaded after user interaction (action, link),
// so it's not included in the initial size
Expand Down
2 changes: 2 additions & 0 deletions packages/brisa/src/utils/compile-files/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('utils', () => {
const constants = getConstants();
const mockExtendPlugins = mock();

process.env.QUIET_MODE = undefined;
globalThis.mockConstants = {
...constants,
PAGES_DIR: DEV_PAGES_DIR,
Expand Down Expand Up @@ -952,6 +953,7 @@ describe('utils', () => {
ASSETS_DIR: path.join(SRC_DIR, 'out', 'public'),
};

process.env.QUIET_MODE = undefined;
mockConsoleLog.mockImplementation(() => {});
mock.module('brisa/server', () => ({
SSRWebComponent,
Expand Down
7 changes: 5 additions & 2 deletions packages/brisa/src/utils/handle-css-files/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import fs from 'node:fs';
import { getConstants } from '@/constants';
import { log, logError } from '../log/log-build';
import { logError } from '../log/log-build';
import { gzipSync } from 'bun';
import { brotliCompressSync } from 'node:zlib';

Expand All @@ -26,7 +26,10 @@ export default async function handleCSSFiles() {
const startTime = Date.now();

if (IS_BUILD_PROCESS) {
log(LOG_PREFIX.WAIT, `transpiling CSS with ${integration.name}...`);
console.log(
LOG_PREFIX.WAIT,
`transpiling CSS with ${integration.name}...`,
);
}

let useDefault = true;
Expand Down

0 comments on commit a1b2788

Please sign in to comment.