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",
"scripts": {
"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:watch": "jest --watch",
"prepublishOnly": "npm run test && npm run build",

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

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

@ -19,10 +19,23 @@ import {
} from "../src";
import { PostShShapeType } from "./.ldo/post.shapeTypes";
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.
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", () => {
setUpServer();
@ -44,6 +57,7 @@ describe("Integration Tests", () => {
</UnauthenticatedSolidLdoProvider>,
);
await screen.findByText("Loading");
debug();
const resourceStatus = await screen.findByRole("status");
expect(resourceStatus.innerHTML).toBe("dataReadSuccess");
});

Loading…
Cancel
Save