catalyst-core-internal 0.0.1-beta.59 → 0.0.1-beta.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +1 -1
- package/package.json +2 -2
- package/dist/scripts/start.test.js +0 -22
- package/run.sh +0 -3
package/changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "catalyst-core-internal",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.60",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Web framework that provides great performance out of the box",
|
|
6
6
|
"bin": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@loadable/webpack-plugin": "^5.15.2",
|
|
54
54
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
55
55
|
"@svgr/webpack": "^8.1.0",
|
|
56
|
-
"@tata1mg/router": "0.0.1-beta.
|
|
56
|
+
"@tata1mg/router": "0.0.1-beta.7",
|
|
57
57
|
"app-root-path": "^3.1.0",
|
|
58
58
|
"babel-loader": "^9.1.3",
|
|
59
59
|
"babel-plugin-react-compiler": "^19.0.0-beta-decd7b8-20250118",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";const fs=require("fs");const path=require("path");const mock=require("mock-fs");const childProcess=require("child_process");const scriptUtils=require("./scriptUtils");// Mock modules
|
|
2
|
-
jest.mock("fs");jest.mock("path");jest.mock("child_process");jest.mock("./scriptUtils");describe("start script",()=>{let originalPlatform;let originalCwd;let originalEnv;beforeEach(()=>{// Save original values
|
|
3
|
-
originalPlatform=process.platform;originalCwd=process.cwd;originalEnv=process.env;// Mock process.cwd
|
|
4
|
-
process.cwd=jest.fn().mockReturnValue("/test/path");// Mock package.json and config.json requires
|
|
5
|
-
jest.mock("/test/path/package.json",()=>({name:"test-app"}),{virtual:true});jest.mock("/test/path/config/config.json",()=>({BUILD_OUTPUT_PATH:"build"}),{virtual:true});// Mock scriptUtils
|
|
6
|
-
scriptUtils.arrayToObject.mockReturnValue({mockArg:"value"});// Mock path
|
|
7
|
-
path.resolve.mockReturnValue("/test/root");path.join.mockReturnValue("/test/root/.catalyst-dev/server/renderer");// Reset all mocks
|
|
8
|
-
jest.clearAllMocks();});afterEach(()=>{// Restore original values
|
|
9
|
-
Object.defineProperty(process,"platform",{value:originalPlatform});process.cwd=originalCwd;process.env=originalEnv;// Clear all mocks
|
|
10
|
-
jest.resetModules();});test("should create server watch path if it does not exist",()=>{// Setup
|
|
11
|
-
fs.existsSync.mockReturnValue(false);// Execute
|
|
12
|
-
require("./start");// Verify
|
|
13
|
-
expect(fs.mkdirSync).toHaveBeenCalledWith("/test/root/.catalyst-dev/server/renderer",{recursive:true});});test("should spawn processes correctly on Windows",()=>{// Setup
|
|
14
|
-
Object.defineProperty(process,"platform",{value:"win32"});// Execute
|
|
15
|
-
require("./start");// Verify
|
|
16
|
-
expect(childProcess.spawn).toHaveBeenCalledTimes(2);expect(childProcess.spawn).toHaveBeenCalledWith(expect.stringContaining("checkVersion"),[],expect.objectContaining({cwd:"/test/root",stdio:"inherit",shell:true,env:expect.objectContaining({NODE_ENV:"development",APPLICATION:"test-app",BUILD_OUTPUT_PATH:"build"})}));});test("should spawn sync process on non-Windows",()=>{// Setup
|
|
17
|
-
Object.defineProperty(process,"platform",{value:"darwin"});// Execute
|
|
18
|
-
require("./start");// Verify
|
|
19
|
-
expect(childProcess.spawnSync).toHaveBeenCalledTimes(1);expect(childProcess.spawnSync).toHaveBeenCalledWith(expect.stringContaining("checkVersion"),[],expect.objectContaining({cwd:"/test/root",stdio:"inherit",shell:true,env:expect.objectContaining({NODE_ENV:"development",APPLICATION:"test-app",BUILD_OUTPUT_PATH:"build"})}));});test("should handle command line arguments",()=>{// Setup
|
|
20
|
-
process.argv=["node","script.js","--test=value"];// Execute
|
|
21
|
-
require("./start");// Verify
|
|
22
|
-
expect(scriptUtils.arrayToObject).toHaveBeenCalledWith(["--test=value"]);});});
|
package/run.sh
DELETED