Watch build commands now work

main
Jackson Morgan 6 months ago
parent 62cb0b502c
commit 7ad79086b7
  1. 2
      packages/connected-solid/package.json
  2. 2
      packages/react/package.json
  3. 2
      packages/solid-react/package.json
  4. 14
      packages/solid-react/test/Solid-Integration.test.tsx

@ -5,7 +5,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"build": "tsc --project tsconfig.build.json", "build": "tsc --project tsconfig.build.json",
"watch": "tsc --watch", "watch": "tsc --project tsconfig.build.json --watch",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage", "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"prepublishOnly": "npm run test && npm run build", "prepublishOnly": "npm run test && npm run build",

@ -5,7 +5,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"build": "tsc --project tsconfig.build.json", "build": "tsc --project tsconfig.build.json",
"watch": "tsc --watch", "watch": "tsc --project tsconfig.build.json --watch",
"test": "npm run test:integration", "test": "npm run test:integration",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"prepublishOnly": "npm run test && npm run build", "prepublishOnly": "npm run test && npm run build",

@ -5,7 +5,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"build": "tsc --project tsconfig.build.json", "build": "tsc --project tsconfig.build.json",
"watch": "tsc --watch", "watch": "tsc --project tsconfig.build.json --watch",
"test": "npm run test:integration", "test": "npm run test:integration",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"prepublishOnly": "npm run test && npm run build", "prepublishOnly": "npm run test && npm run build",

@ -19,10 +19,23 @@ import {
} from "../src"; } from "../src";
import { PostShShapeType } from "./.ldo/post.shapeTypes"; import { PostShShapeType } from "./.ldo/post.shapeTypes";
import type { PostSh } from "./.ldo/post.typings"; import type { PostSh } from "./.ldo/post.typings";
import { debug } from "jest-preview";
// Use an increased timeout, since the CSS server takes too much setup time. // Use an increased timeout, since the CSS server takes too much setup time.
jest.setTimeout(40_000); jest.setTimeout(40_000);
const oldFetch = global.fetch;
global.fetch = async (
input: string | Request | URL,
init?: RequestInit | undefined,
): Promise<Response> => {
console.log("-------");
console.log(input, init);
const response = await oldFetch(input, init);
console.log(response.status);
return response;
};
describe("Integration Tests", () => { describe("Integration Tests", () => {
setUpServer(); setUpServer();
@ -44,6 +57,7 @@ describe("Integration Tests", () => {
</UnauthenticatedSolidLdoProvider>, </UnauthenticatedSolidLdoProvider>,
); );
await screen.findByText("Loading"); await screen.findByText("Loading");
debug();
const resourceStatus = await screen.findByRole("status"); const resourceStatus = await screen.findByRole("status");
expect(resourceStatus.innerHTML).toBe("dataReadSuccess"); expect(resourceStatus.innerHTML).toBe("dataReadSuccess");
}); });

Loading…
Cancel
Save