Skip to content
Merged

Cli #386

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import type { Config } from 'jest';
import nextJest from 'next/jest.js';

const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
dir: './',
});

// Add any custom config to be passed to Jest
const config: Config = {
coverageProvider: 'v8',
testEnvironment: 'jsdom',
Expand Down Expand Up @@ -49,5 +47,4 @@ const config: Config = {
],
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config);
3 changes: 0 additions & 3 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import '@testing-library/jest-dom';

// Configurar variables de entorno para los tests
process.env.APP_ENV = 'test';
process.env.DEV_CACHE_ENABLED = 'true';

global.console.warn = jest.fn();

// Polyfill para structuredClone si no está disponible (Node < 17)
if (typeof global.structuredClone === 'undefined') {
global.structuredClone = (obj: any) => {
return JSON.parse(JSON.stringify(obj));
};
}

// Polyfill para Request y Response (necesario para el SDK de Polar)
global.Request =
global.Request ||
class Request {
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
* Theme Studio - Presentación (sin Polaris Frame para evitar scroll)
*/

'use client';

import { Sidebar } from './sidebar/Sidebar';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export function iframeSelectionScript(storeDomain) {

return `(function() {
'use strict';
if (window.self === window.top) {
return;
}
var NS_KEY = '__FASTTIFY_THEME_STUDIO_NS__';
if (window[NS_KEY]) {
return;
Expand Down
Loading